pandas.Timestamp.fromordinal
pandas 3.1.1 · Arrays, scalars, and data types · method
Create a timestamp from a proleptic Gregorian day number, where ordinal 1 is January 1 of year 1.
Call syntax
Timestamp.fromordinal(ordinal, tz=None)Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
ordinal |
Required Positional or keyword |
int |
tz |
Optional Positional or keyword Default None |
str, zoneinfo.ZoneInfo, pytz.timezone, dateutil.tz.tzfile or None Supply a timezone name or timezone object. |
Returns
Timestamp