@@ -175,12 +175,8 @@ you can pass the ``dayfirst`` flag:
175175   can't be parsed with the day being first it will be parsed as if
176176   ``dayfirst `` were False.
177177
178- .. note ::
179-    Specifying a ``format `` argument will potentially speed up the conversion
180-    considerably and explicitly specifying
181-    a format string of '%Y%m%d' takes a faster path still.
182- 
183178If you pass a single string to ``to_datetime ``, it returns single ``Timestamp ``.
179+ 
184180Also, ``Timestamp `` can accept the string input.
185181Note that ``Timestamp `` doesn't accept string parsing option like ``dayfirst ``
186182or ``format ``, use ``to_datetime `` if these are required.
@@ -191,6 +187,25 @@ or ``format``, use ``to_datetime`` if these are required.
191187
192188    pd.Timestamp(' 2010/11/12'  
193189
190+ 
191+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
192+ 
193+ In addition to the required datetime string, a ``format `` argument can be passed to ensure specific parsing.
194+ It will potentially speed up the conversion considerably.
195+ 
196+ For example:
197+ 
198+ .. ipython :: python 
199+ 
200+     pd.to_datetime(' 2010/11/12' format = ' %Y/%m/%d '  
201+ 
202+     pd.to_datetime(' 12-11-2010 00:00' format = ' %d -%m-%Y %H:%M'  
203+ 
204+ format `` options, see https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior.
205+ 
206+ Assembling datetime from multiple DataFrame columns
207+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
208+ 
194209.. versionadded :: 0.18.1 
195210
196211You can also pass a ``DataFrame `` of integer or string columns to assemble into a ``Series `` of ``Timestamps ``.
0 commit comments