Skip to content

Commit eaca790

Browse files
committed
adding extended summary, populating return description and adding see also section
1 parent c4467a9 commit eaca790

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

pandas/core/indexes/datetimelike.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,13 +441,25 @@ def as_unit(self, unit: str) -> Self:
441441
"""
442442
Convert to a dtype with the given unit resolution.
443443
444+
This method is for converting the dtype of a ``DatetimeIndex`` or
445+
``TimedeltaIndex`` to a new dtype with the given unit
446+
resolution/precision.
447+
444448
Parameters
445449
----------
446450
unit : {'s', 'ms', 'us', 'ns'}
447451
448452
Returns
449453
-------
450454
same type as self
455+
Converted to the specified unit.
456+
457+
See Also
458+
--------
459+
Timestamp.as_unit : Convert to the given unit.
460+
Timedelta.as_unit : Convert to the given unit.
461+
DatetimeIndex.as_unit : Convert to the given unit.
462+
TimedeltaIndex.as_unit : Convert to the given unit.
451463
452464
Examples
453465
--------

0 commit comments

Comments
 (0)