Skip to content

Commit

Permalink
back to s.index = keys
Browse files Browse the repository at this point in the history
  • Loading branch information
FBruzzesi committed Nov 10, 2024
1 parent 2466bc7 commit b43197c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions narwhals/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,9 @@ def maybe_set_index(
if column_names:
msg = "Cannot set index using column names on a Series"
raise ValueError(msg)

native_obj.index = keys
return df_any._from_compliant_series( # type: ignore[no-any-return]
df_any._compliant_series._from_native_series(native_obj.set_axis(keys))
df_any._compliant_series._from_native_series(native_obj)
)
else:
return df_any # type: ignore[no-any-return]
Expand Down

0 comments on commit b43197c

Please sign in to comment.