pandas.DatetimeIndex.as_unit

DatetimeIndex.as_unit(*args, **kwargs)[source]

Convert to a dtype with the given unit resolution.

Parameters:
unit{‘s’, ‘ms’, ‘us’, ‘ns’}
Returns:
same type as self