Skip to content

Commit

Permalink
code sample for pandas-dev#43336
Browse files Browse the repository at this point in the history
  • Loading branch information
simonjayhawkins committed Sep 1, 2021
1 parent 77607dd commit bbb1b11
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions bisect/43336.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# BUG: Change in index of empty dataframes in mode operation #43336

import pandas as pd

print(pd.__version__)

df = pd.DataFrame({"a": ["a", "b", "a"]}, index=["a", "b", "c"])
result = df.mode(numeric_only=True)
print(result)

expected = pd.DataFrame(index=["a", "b", "c"])
pd.testing.assert_frame_equal(result, expected)

0 comments on commit bbb1b11

Please sign in to comment.