79492074

Date: 2025-03-07 11:10:40
Score: 0.5
Natty:
Report link

Add this line so that if there are NaT values in the 'TicketDate' column, it converts to None rather than throwing an error.

df['TicketDate'] = df['TicketDate'].fillna(pd.NaT).apply(
    lambda x: x.strftime('%Y-%m-%d') if pd.notna(x) else None
)
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Coco Q.