pandas.Timestamp.to_pydatetime

pandas 3.1.1 · Arrays, scalars, and data types · method

Convert timestamps to standard-library datetime objects.

Call syntax

Timestamp.to_pydatetime(warn=True)

Run the example

Edit the example and select Run Python to see the result.

Parameters

ParameterRequirementAccepted values and behavior
warn Optional
Positional or keyword
Default True
bool

Returns

datetime.datetime or NaT