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 def test_cudf_dataframe_operations(self):
9 import cudf
10
11 data = {'col1': [1, 2, 3], 'col2': [4, 5, 6]}
12 gdf = cudf.DataFrame({'col1': [1, 2, 3], 'col2': [4, 5, 6]})
13
14 gdf['col3'] = gdf['col1'] + gdf['col2']
15
16 expected_col3 = cudf.Series([5, 7, 9])
17 self.assertEqual(gdf.shape, (3, 3))
18 self.assertEqual(list(gdf.columns), ['col1', 'col2', 'col3'])
19 self.assertTrue(gdf['col3'].equals(expected_col3))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected