Skip to content

Commit

Permalink
FIX-#4058: Allow pickling empty dataframes and series. (#4095)
Browse files Browse the repository at this point in the history
Co-authored-by: Rehan Sohail Durrani <[email protected]>
Signed-off-by: mvashishtha <[email protected]>
  • Loading branch information
2 people authored and devin-petersohn committed Feb 4, 2022
1 parent e2996e8 commit 025190c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions modin/pandas/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
"_inflate_light",
"_inflate_full",
"__reduce__",
"__reduce_ex__",
} | _ATTRS_NO_LOOKUP


Expand Down
3 changes: 3 additions & 0 deletions modin/pandas/test/dataframe/test_pickle.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ def persistent(request):
PersistentPickle.put(old)


@pytest.mark.parametrize(
"modin_df", [pytest.param(modin_df), pytest.param(pd.DataFrame(), id="empty_df")]
)
def test_dataframe_pickle(modin_df, persistent):
other = pickle.loads(pickle.dumps(modin_df))
df_equals(modin_df, other)
Expand Down

0 comments on commit 025190c

Please sign in to comment.