Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion doc/source/user_guide/timedeltas.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,19 @@ or a list/array of strings:

pd.to_timedelta(["1 days 06:05:01.00003", "15.5us", "nan"])

The ``unit`` keyword argument specifies the unit of the Timedelta:
The ``unit`` keyword argument specifies the unit of the Timedelta if the input
is numeric:

.. ipython:: python

pd.to_timedelta(np.arange(5), unit="s")
pd.to_timedelta(np.arange(5), unit="d")

.. warning::
If a string or array of strings is passed as an input then the ``unit`` keyword
argument will be ignored. If a string without units is passed then the default
unit of nanoseconds is assumed.

.. _timedeltas.limitations:

Timedelta limitations
Expand Down