File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -441,13 +441,25 @@ def as_unit(self, unit: str) -> Self:
441
441
"""
442
442
Convert to a dtype with the given unit resolution.
443
443
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
+
444
448
Parameters
445
449
----------
446
450
unit : {'s', 'ms', 'us', 'ns'}
447
451
448
452
Returns
449
453
-------
450
454
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.
451
463
452
464
Examples
453
465
--------
You can’t perform that action at this time.
0 commit comments