Out of bounds nanosecond timestamp
<p>I have a variable ['date_hiring'] in Googlespeedsheet in format like</p>

<pre><code>16.01.2016
</code></pre>

<p>I import it in Python, the variable has an object type. I try to convert to datetime </p>

<pre><code>from datetime import datetime
data['date_hiring'] = pd.to_datetime(data['date_hiring'])
</code></pre>

<p>and i get</p>

<pre><code>OutOfBoundsDatetime: Out of bounds nanosecond timestamp: 16-01-06 00:00:00
</code></pre>

<p>i know from this <a href="http://stackoverflow.com/questions/32888124/pandas-out-of-bounds-nanosecond-timestamp-after-offset-rollforward-plus-adding-a">pandas out of bounds nanosecond timestamp after offset rollforward plus adding a month offset</a> that </p>

<blockquote>
  <p>Since pandas represents timestamps in nanosecond resolution, the
  timespan that can be represented using a 64-bit integer is limited to
  approximately 584 years</p>
</blockquote>

<p>but in original data in the Googlespeedsheet i have no data like '16.01.06' </p>

<p>Just like '16.06.2006'</p>

<p>So the problem is in converting </p>

<p>How to improve it?</p>

<p>According to the <a href="http://pandas.pydata.org/pandas-docs/stable/generated/pandas.to_datetime.html" rel="nofollow">documentation</a>, the <em>dayfirst</em> field defaults to false:</p>

<blockquote>
  <p>dayfirst : boolean, default False</p>
</blockquote>

<p>So it must have decided that there was a malformed date there an tried to interpret it as a time-of-day.  But even then it probably didn't think that 16 point anything could be hours or minutes, so it tried to convert it as seconds.  But there is a extra decimal point so it gave up and said I don't like the fractional seconds.   (Or something like that.)</p>

<p>I think you can fix it by giving an explicit format string or at least setting <em>dayfirst</em>.</p>

python datetime pandas