79770450

Date: 2025-09-20 17:22:14
Score: 1
Natty:
Report link

With input from furas, I added a line of code which worked. Below is the code.

I still include this line in the data cleaning function:

f1['Date'] = pd.to_datetime(f1['date'])

But if I add this line of code immediately after:

f1['Date'] = f1['Date'].dt.tz_localize(None)

It removes the timestamp and leaves me with only yyyy-mm-dd

Thanks, as always, good people of Stack overflow

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: GC123