pandas.Timestamp.as_unit

Timestamp.as_unit()

Convert the underlying int64 representaton to the given unit.

Parameters:
unit{“ns”, “us”, “ms”, “s”}
round_okbool, default True

If False and the conversion requires rounding, raise.

Returns:
Timestamp