Skip to content

Commit

Permalink
old pandas
Browse files Browse the repository at this point in the history
  • Loading branch information
FBruzzesi committed Sep 10, 2024
1 parent dac421d commit 4f54d57
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion narwhals/_pandas_like/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,10 @@ def to_arrow(self: Self) -> Any:
return pa.Array.from_pandas(self._native_series)

def mode(self: Self) -> Self:
return self._from_native_series(self._native_series.mode())
native_series = self._native_series
result = native_series.mode()
result.name = native_series.name
return self._from_native_series(result)

@property
def str(self) -> PandasLikeSeriesStringNamespace:
Expand Down

0 comments on commit 4f54d57

Please sign in to comment.