ser = pd.Series([1, 1, None, None], dtype="int64[pyarrow]")
ser.mode(dropna=True)
ser.mode(dropna=False)
With either dropna=True or dropna=False, we get back Series([1], dtype="int64[pyarrow]")
. I'd expect that with dropna=True, but expeced to get Series([1, None], dtype="int64[pyarrow]")
with dropna=False.
Encountered while trying to fix the mode xfail for string dtype by implementing it in terms of value_counts, which does behave the way I expected.