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 have noticed a lot of dataframe reshaping functions acquiring the ignore_index keyword. (e.g. #30114). I think df.dropna() is a good candidate for this keyword, as are any other functions which change the index from being a consecutive sequence of integers
Expected Output
In [1]: importpandasaspdIn [2]: df=pd.DataFrame({'A': [0, pd.NA, 1]})
In [3]: dfOut[3]:
A001<NA>21In [4]: df.dropna().reset_index(drop=True)
Out[4]:
A0011In [5]: df.dropna(ignore_index=True)
Out[5]:
A0011
The text was updated successfully, but these errors were encountered:
Code Sample
Before
After
Problem description
I have noticed a lot of dataframe reshaping functions acquiring the
ignore_index
keyword. (e.g. #30114). I thinkdf.dropna()
is a good candidate for this keyword, as are any other functions which change the index from being a consecutive sequence of integersExpected Output
The text was updated successfully, but these errors were encountered: