avoiding error from pd.to_datetime in pandas
<p>I have a huge dataframe more than 100 mln rows.  In that I have a date columns, unfortunately have improper formatted (mixed) date strings.</p>

<p>Now I did convert it to datetime by: </p>

<pre><code>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
</code></pre>

<p>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.</p>

<p>Just intersted, if the week conversion line can have something like if anything getting out of range place a default...</p>

<p>Have the idea but as a newbie. Don't have that much experience to do that.</p>

<p>It would be great help if someone can give a code line to handle that.</p>