I'm having a hard time with pd.to_datetime() in Python 3 on Anaconda. Hopefully it's a simple fix, but it's saying that the issue is the data is a series type and not a DataFrame. Can someone please let me know if there's a quick fix to this?
This is the code that's giving me an error:
pd.to_datetime(Confirmed_Date_test.ObservationDate, errors='coerce', format='%d%m%Y')
This is the error I'm getting:
Here is the code where the data is wrangled:
It was resolved by adding .to_frame() to the end of the ln 39.