I am getting value error while parsing it to date time format in pandas

37 Views Asked by At

ValueError: time data "44033" doesn't match format "%d/%m/%Y", at position 0.

You might want to try: - passing format if your strings have a consistent format; - passing format='ISO8601' if your strings are all ISO8601 but not necessarily in exactly the same format; - passing format='mixed', and the format will be inferred for each element individually. You might want to use dayfirst alongside this.

In my dataframe I have date column which pandas is recognizing it as a float. The following is what I used to convert it,

df_1['Document Date'] = pd.to_datetime(
  df_1['Document Date'],
  format ='%d/%m/%Y', 
  origin='unix'
)
df_1

I have tried using chat GPT to help me

0

There are 0 best solutions below