<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pd.to_datetime(pd.Series('5pm april'))
"><pre class="notranslate"><code class="notranslate">pd.to_datetime(pd.Series('5pm april'))

</code></pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">Strings that can be parsed by dateutil fail to parse in pandas. Also, it would be good to set the default date manually and have it default to the current date as it does in dateutil.</p>
<blockquote>
<blockquote>
<blockquote>
<p dir="auto">print(dateutil.parser.parse('5pm april'))<br>
2017-04-26 17:00:00</p>
</blockquote>
</blockquote>
</blockquote>
<h4 dir="auto">Output</h4>
<p dir="auto">line 401, in _convert_listlike<br>
require_iso8601=require_iso8601<br>
File "pandas/tslib.pyx", line 2374, in pandas.tslib.array_to_datetime (pandas/tslib.c:46691)<br>
File "pandas/tslib.pyx", line 2557, in pandas.tslib.array_to_datetime (pandas/tslib.c:45585)<br>
File "pandas/tslib.pyx", line 2525, in pandas.tslib.array_to_datetime (pandas/tslib.c:45052)<br>
File "pandas/tslib.pyx", line 2519, in pandas.tslib.array_to_datetime (pandas/tslib.c:44933)<br>
File "pandas/tslib.pyx", line 1538, in pandas.tslib.convert_to_tsobject (pandas/tslib.c:28700)<br>
File "pandas/tslib.pyx", line 1793, in pandas.tslib._check_dts_bounds (pandas/tslib.c:32835)<br>
pandas.tslib.OutOfBoundsDatetime: Out of bounds nanosecond timestamp: 1-04-01 17:00:00</p>
<h4 dir="auto">Expected Output</h4>
<p dir="auto">0   2017-04-01 17:00:00<br>
dtype: datetime64[ns]</p>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 3.5.1.final.0
python-bits: 64
OS: Darwin
OS-release: 16.5.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
<p dir="auto">pandas: 0.19.2<br>
nose: None<br>
pip: 9.0.1<br>
setuptools: 18.2<br>
Cython: None<br>
numpy: 1.12.1<br>
scipy: 0.18.0<br>
statsmodels: None<br>
xarray: None<br>
IPython: 5.1.0<br>
sphinx: 1.4.6<br>
patsy: None<br>
dateutil: 2.6.0<br>
pytz: 2017.2<br>
blosc: None<br>
bottleneck: None<br>
tables: None<br>
numexpr: None<br>
matplotlib: 1.5.3<br>
openpyxl: None<br>
xlrd: None<br>
xlwt: None<br>
xlsxwriter: None<br>
lxml: None<br>
bs4: None<br>
html5lib: None<br>
httplib2: None<br>
apiclient: None<br>
sqlalchemy: None<br>
pymysql: None<br>
psycopg2: 2.6.2 (dt dec pq3 ext)<br>
jinja2: 2.8<br>
boto: None<br>
pandas_datareader: None</p>
</details>
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [147]: pandas.Timestamp('4 pm')
---------------------------------------------------------------------------
OutOfBoundsDatetime                       Traceback (most recent call last)
&lt;ipython-input-147-333a3814fcab&gt; in &lt;module&gt;()
----&gt; 1 pandas.Timestamp('4 pm')

pandas/tslib.pyx in pandas.tslib.Timestamp.__new__ (pandas/tslib.c:10447)()

pandas/tslib.pyx in pandas.tslib.convert_to_tsobject (pandas/tslib.c:27555)()

pandas/tslib.pyx in pandas.tslib.convert_str_to_tsobject (pandas/tslib.c:29955)()

pandas/tslib.pyx in pandas.tslib.convert_to_tsobject (pandas/tslib.c:28700)()

pandas/tslib.pyx in pandas.tslib._check_dts_bounds (pandas/tslib.c:32835)()

OutOfBoundsDatetime: Out of bounds nanosecond timestamp: 1-01-01 16:00:00

"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">147</span>]: <span class="pl-s1">pandas</span>.<span class="pl-v">Timestamp</span>(<span class="pl-s">'4 pm'</span>)
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span>
<span class="pl-v">OutOfBoundsDatetime</span>                       <span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>)
<span class="pl-c1">&lt;</span><span class="pl-s1">ipython</span><span class="pl-c1">-</span><span class="pl-s1">input</span><span class="pl-c1">-</span><span class="pl-c1">147</span><span class="pl-c1">-</span><span class="pl-c1">333</span><span class="pl-s1">a3814fcab</span><span class="pl-c1">&gt;</span> <span class="pl-s1">in</span> <span class="pl-c1">&lt;</span><span class="pl-s1">module</span><span class="pl-c1">&gt;</span>()
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">1</span> <span class="pl-s1">pandas</span>.<span class="pl-v">Timestamp</span>(<span class="pl-s">'4 pm'</span>)

<span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">tslib</span>.<span class="pl-s1">pyx</span> <span class="pl-c1">in</span> <span class="pl-s1">pandas</span>.<span class="pl-s1">tslib</span>.<span class="pl-v">Timestamp</span>.<span class="pl-en">__new__</span> (<span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">tslib</span>.<span class="pl-s1">c</span>:<span class="pl-c1">10447</span>)()

<span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">tslib</span>.<span class="pl-s1">pyx</span> <span class="pl-c1">in</span> <span class="pl-s1">pandas</span>.<span class="pl-s1">tslib</span>.<span class="pl-en">convert_to_tsobject</span> (<span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">tslib</span>.<span class="pl-s1">c</span>:<span class="pl-c1">27555</span>)()

<span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">tslib</span>.<span class="pl-s1">pyx</span> <span class="pl-c1">in</span> <span class="pl-s1">pandas</span>.<span class="pl-s1">tslib</span>.<span class="pl-en">convert_str_to_tsobject</span> (<span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">tslib</span>.<span class="pl-s1">c</span>:<span class="pl-c1">29955</span>)()

<span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">tslib</span>.<span class="pl-s1">pyx</span> <span class="pl-c1">in</span> <span class="pl-s1">pandas</span>.<span class="pl-s1">tslib</span>.<span class="pl-en">convert_to_tsobject</span> (<span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">tslib</span>.<span class="pl-s1">c</span>:<span class="pl-c1">28700</span>)()

<span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">tslib</span>.<span class="pl-s1">pyx</span> <span class="pl-c1">in</span> <span class="pl-s1">pandas</span>.<span class="pl-s1">tslib</span>.<span class="pl-en">_check_dts_bounds</span> (<span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">tslib</span>.<span class="pl-s1">c</span>:<span class="pl-c1">32835</span>)()

<span class="pl-v">OutOfBoundsDatetime</span>: <span class="pl-v">Out</span> <span class="pl-s1">of</span> <span class="pl-s1">bounds</span> <span class="pl-s1">nanosecond</span> <span class="pl-s1">timestamp</span>: <span class="pl-c1">1</span><span class="pl-c1">-</span><span class="pl-c1">01</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">16</span>:<span class="pl-c1">00</span>:<span class="pl-c1">00</span>
</pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">this type of string conversion doesn't work with 0.19.2 since upgrade from 0.16.0<br>
traced the problem using git bisect to this commit:<br>
<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/pandas-dev/pandas/commit/c2ea0d4d1f7333dfb5f35d0795267d8894a37d83/hovercard" href="https://github.com/pandas-dev/pandas/commit/c2ea0d4d1f7333dfb5f35d0795267d8894a37d83"><tt>c2ea0d4</tt></a></p>
<h4 dir="auto">Expected Output</h4>
<p dir="auto">In [3]: pandas.Timestamp('4 pm')<br>
Out[3]: Timestamp('2017-04-20 16:00:00')</p>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
INSTALLED VERSIONS
------------------
commit: None
python: 2.7.6.final.0
python-bits: 64
OS: Linux
OS-release: 3.13.0-112-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: None.None
<p dir="auto">pandas: 0.19.2<br>
nose: None<br>
pip: 9.0.1<br>
setuptools: 34.3.3<br>
Cython: None<br>
numpy: 1.11.2<br>
scipy: None<br>
statsmodels: None<br>
xarray: None<br>
IPython: 5.3.0<br>
sphinx: None<br>
patsy: None<br>
dateutil: 2.5.3<br>
pytz: 2016.7<br>
blosc: None<br>
bottleneck: None<br>
tables: None<br>
numexpr: None<br>
matplotlib: None<br>
openpyxl: None<br>
xlrd: None<br>
xlwt: None<br>
xlsxwriter: None<br>
lxml: None<br>
bs4: None<br>
html5lib: None<br>
httplib2: None<br>
apiclient: None<br>
sqlalchemy: None<br>
pymysql: None<br>
psycopg2: None<br>
jinja2: None<br>
boto: None<br>
pandas_datareader: None</p>
</details>