I have a huge dataframe more than 100 mln rows. In that I have a date columns, unfortunately have improper formatted (mixed) date strings.
Now I did convert it to datetime by:
df['TRX_DATE'] = pd.to_datetime(df['TRX_DATE'],coerce=True) # without any error # Now i want to calculate week day from that date columns df['day_type'] = [x.strftime('%A') for x in d['TRX_DATE']] ###ValueError: month out of range
If it would a single field I can manage with dateutil parser. But in this case I am getting out of idea, how to handle that.
Just intersted, if the week conversion line can have something like if anything getting out of range place a default...
Have the idea but as a newbie. Don't have that much experience to do that.
It would be great help if someone can give a code line to handle that.