MCPcopy Create free account
hub / github.com/Kaggle/docker-python / TestCudf

Class TestCudf

tests/test_cudf.py:6–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4
5
6class TestCudf(unittest.TestCase):
7 @gpu_test
8 @p100_exempt # b/342143152: cuDL(>=24.4v) is inompatible with p100 GPUs.
9 def test_cudf_dataframe_operations(self):
10 import cudf
11
12 data = {'col1': [1, 2, 3], 'col2': [4, 5, 6]}
13 gdf = cudf.DataFrame({'col1': [1, 2, 3], 'col2': [4, 5, 6]})
14
15 gdf['col3'] = gdf['col1'] + gdf['col2']
16
17 expected_col3 = cudf.Series([5, 7, 9])
18 self.assertEqual(gdf.shape, (3, 3))
19 self.assertEqual(list(gdf.columns), ['col1', 'col2', 'col3'])
20 self.assertTrue(gdf['col3'].equals(expected_col3))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected