You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to propose pd.Series.alias(new name) to allow for convenient renaming of a Series.
This comes in handy when renaming within a function, and allow for changing a Series name via a callable.
pd.Series.rename only changes the name if a scalar is passed; if a callable is passed, it is passed to the index labels, not the name of the Series. alias works only on the name, not the index labels.
Brief Description
I would like to propose pd.Series.alias(new name) to allow for convenient renaming of a Series.
This comes in handy when renaming within a function, and allow for changing a Series name via a callable.
pd.Series.rename only changes the name if a scalar is passed; if a callable is passed, it is passed to the index labels, not the name of the Series. alias works only on the name, not the index labels.
Example API
The text was updated successfully, but these errors were encountered: