0

I am trying to profile_report in ydata_profiling and I get the following error:

TypeError: descriptor 'to_pydatetime' for 'pandas._libs.tslibs.timestamps._Timestamp' objects doesn't apply to a 'datetime.date' object.

I figured that the pandas data frame I am using had some date fields and indeed those cause this error. I used print(df['effective_date'].apply(type)) and I got datetime.date as the data type in this field. I tried to convert it to the timestamp data type but I faced some challenges.

Why does the data type need to be timestamp? The to_pydatetime seems to convert timestamp into datetime which my data already is. Is there a way around this to opt out from profile_report trying to convert my data into something it already is?

FObersteiner
  • 22,500
  • 8
  • 42
  • 72

0 Answers0