pandas-in-action
pandas-in-action copied to clipboard
when transform the pandas.Series into pandas.DataFrame in chapter_03_series_methods.ipynb
chapter_03_series_methods.ipynb
the code in the In [4]
pd.read_csv("pokemon.csv", index_col = "Pokemon", squeeze = True)
will prompt like this:
FutureWarning: The squeeze argument has been deprecated and will be removed in a future version. Append .squeeze("columns") to the call to squeeze.
according to Pandas docs, in Pandas 1.4.0 and later, it should be revised as
pd.read_csv('pokemon.csv', index_col='Pokemon').squeeze(1)
pd.read_csv('pokemon.csv', index_col='Pokemon').squeeze('columns')
will work in pandas 1.4.0 and later
what if i have a single column it's not working for single column @JPL-JUNO