I have a dataframe, test
, that contains winter temperatures since 1951 for a city. I want to plot the temperatures contained in the column called wintermean
but when I try to do that using plt.plot(test.wintermean.values)
I get the following error: TypeError: cannot convert the series to <class 'float'>. Here's what test
, wintermean
, and test.wintermean.values
looks like: How can I plot this temperature data?
Looks like your DataFrame has a single row and the column value is a pandas.Series
. To plot that series, try:
test["wintermean"].iloc[0].plot()