Пример #1
0
def test_get_dataframe_package_cudf():
    cudf = pytest.importorskip("cudf")
    df = cudf.DataFrame({'x': np.arange(10, dtype=float), 'y': [1.0, 2.0] * 5})
    assert cudf == get_dataframe_package(df)
    assert cudf == get_dataframe_package(df.x)
    assert cudf == get_dataframe_package(df.index)
Пример #2
0
def test_get_dataframe_package_pandas():
    df = pd.DataFrame({'x': np.arange(10, dtype=float), 'y': [1.0, 2.0] * 5})
    assert pd == get_dataframe_package(df)
    assert pd == get_dataframe_package(df.x)
    assert pd == get_dataframe_package(df.index)