pandas handle column with different date time formats gracefully
<p>I have a column with a birthdate. Some are N.A, some <code>01.01.2016</code> but some contain <code>01.01.2016 01:01:01</code>
Filtering the N.A. values works fine. But handling the different date formats seems clumsy. Is it possible to have pandas handle these gracefully and e.g. for a birthdate only interpret the date and not fail?</p>

<p><code>pd.to_datetime()</code> will handle multiple formats</p>

<pre><code>&gt;&gt;&gt; ser = pd.Series(['NaT', '01.01.2016', '01.01.2016 01:01:01'])
&gt;&gt;&gt; pd.to_datetime(ser)
0                   NaT
1   2016-01-01 00:00:00
2   2016-01-01 01:01:01
dtype: datetime64[ns]
</code></pre>

python date datetime pandas