diff --git a/python/cudf/cudf/pandas/_wrappers/pandas.py b/python/cudf/cudf/pandas/_wrappers/pandas.py index a64bf7772fe..be36a47ac4b 100644 --- a/python/cudf/cudf/pandas/_wrappers/pandas.py +++ b/python/cudf/cudf/pandas/_wrappers/pandas.py @@ -907,6 +907,12 @@ def Index__new__(cls, *args, **kwargs): _eval_func = _FunctionProxy(_Unusable(), pd.eval) +register_proxy_func(pd.read_pickle)( + _FunctionProxy(_Unusable(), pd.read_pickle) +) + +register_proxy_func(pd.to_pickle)(_FunctionProxy(_Unusable(), pd.to_pickle)) + def _get_eval_locals_and_globals(level, local_dict=None, global_dict=None): frame = sys._getframe(level + 3) diff --git a/python/cudf/cudf_pandas_tests/test_cudf_pandas.py b/python/cudf/cudf_pandas_tests/test_cudf_pandas.py index f51ce103677..d943a962e9e 100644 --- a/python/cudf/cudf_pandas_tests/test_cudf_pandas.py +++ b/python/cudf/cudf_pandas_tests/test_cudf_pandas.py @@ -1080,6 +1080,13 @@ def test_pickle(obj): tm.assert_equal(obj, copy) + with tempfile.TemporaryFile() as f: + xpd.to_pickle(obj, f) + f.seek(0) + copy = xpd.read_pickle(f) + + tm.assert_equal(obj, copy) + def test_dataframe_query(): cudf_pandas_df = xpd.DataFrame({"foo": [1, 2, 3], "bar": [4, 5, 6]})