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 wish I could update the index of a dataframe inplace.
Feature Description
Functions pd.DataFrame.set_index() and pd.DataFrame.reset_index() both have an option of inplace=True. I hope function pd.DataFrame.reindex() add it as well. This might lead to adding another option of drop=True.
Alternative Solutions
N/A
Additional Context
No response
The text was updated successfully, but these errors were encountered:
Specifically for reindex, this is an example of method that in practice can never be done in-place, so the inplace=True option would just be the same as doing df = df.reindex(..) under the hood.
Feature Type
Adding new functionality to pandas
Changing existing functionality in pandas
Removing existing functionality in pandas
Problem Description
I wish I could update the index of a dataframe inplace.
Feature Description
Functions
pd.DataFrame.set_index()
andpd.DataFrame.reset_index()
both have an option ofinplace=True
. I hope functionpd.DataFrame.reindex()
add it as well. This might lead to adding another option ofdrop=True
.Alternative Solutions
N/A
Additional Context
No response
The text was updated successfully, but these errors were encountered: