I am trying to parse this column to a column containing the weekday. Eg. 0-6 or 'Monday', 'Tuesday'...
0 2020-10-06 03:39:51.000000
1 2020-10-06 09:48:10.000000
2 2020-10-06 14:19:27.000000
3 2020-10-05 10:21:22.000000
4 2020-10-05 13:35:06.000000
Name: charging_start, dtype: object
I am sorry for the beginner question, but I am one. I was playing with datetime, but could not make it work. This was my last approach:
from datetime import date
test = '2020-10-06 03:39:51.000000'
print("\n{}\n".format(test))
print(date.fromisoformat(test))
Resulting to:
2020-10-06 03:39:51.000000
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-318-81788367097a> in <module>
13
14 test = '2020-10-06 03:39:51.000000'
---> 15 print(date.fromisoformat(test))
ValueError: Invalid isoformat string: '2020-10-06 03:39:51.000000'