title: Processing data with incorrect dates like 30th of February
body: <p>In trying to process a large number of bank account statements given in CSV format I realized that some of the dates are incorrect (30th of February, which is not possible).</p>
  <p>So this snippet fails [1] telling me that some dates are incorrect:</p>
  <pre><code>        df_from_csv = pd.read_csv(   csv_filename
                                     , encoding='cp1252'
                                     , sep=&quot;;&quot;
                                     , thousands='.', decimal=&quot;,&quot;
                                     , dayfirst=True
                                     , parse_dates=['Buchungstag', 'Wertstellung']  
                                   )
  </code></pre>
  <p>I could of course pre-process those CSV files and replace the 30th of Feb with 28th of Feb (or whatever the Feb ended in that year).</p>
  <p>But is there a way to do this in Pandas, while importing? Like &quot;If this column fails, set it to X&quot;?</p>
  <h2>Sample row</h2>
  <p><code>775945;28.02.2018;30.02.2018;;901;&quot;Zinsen&quot;</code></p>
  <p>As you can see, the date <code>30.02.2018</code> is not correct, because there ain't no 30th of Feb. But this seems to be a known problem in Germany. See [2].</p>
  <hr />
  <p>[1] Here's the error message:</p>
  <p><code>ValueError: day is out of range for month</code></p>
  <p>[2] <a href="https://de.wikipedia.org/wiki/30._Februar" rel="nofollow noreferrer">https://de.wikipedia.org/wiki/30._Februar</a></p>