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
When running the first cell in Chapter 8 in Simulated-Data.ipynb, I got the following error in a few places: Can only use .dt accessor with datetimelike values
I was able to get it to work by adding pd.to_datetime in various places. I originally adding pd.to_datetime to the date column but that caused other issues. Not sure if there is a better way.
Just a friendly suggestion; it would be handy for readers if the python version you used was specified in the readme and a requirements.txt was provided in the repo with specific package versions, to help ensure we can run the code without issues.
I'm guessing the code runs in your environment and so I assume the issue is caused by different pandas versions.
Python 3.11; pandas 2.0.3; numpy 1.25.1
When running the first cell in Chapter 8 in
Simulated-Data.ipynb
, I got the following error in a few places:Can only use .dt accessor with datetimelike values
I was able to get it to work by adding
pd.to_datetime
in various places. I originally addingpd.to_datetime
to the date column but that caused other issues. Not sure if there is a better way.and then in the second cell I had to change
to
The text was updated successfully, but these errors were encountered: