I have a dataframe looks like this:
date score
2017-06-04 90
2017-06-03 80
2017-06-02 70
When I tried this:
sns.regplot(x=date, y=score, data=df)
I got an error:
TypeError: reduction operation 'mean' not allowed for this dtype
The dtype for date is datetime64[ns]
, and int64
for the score column.
How can I covert the date
column so that regplot
will work?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…