>>> pd.Timestamp(year=2017, month=1, day=1, hour=12)
Timestamp('2017-01-01 12:00:00')
Attributes
Return numpy datetime64 format in nanoseconds.
day_of_week
Return day of the week.
day_of_year
Return the day of the year.
dayofweek
Return day of the week.
dayofyear
Return the day of the year.
days_in_month
Return the number of days in the month.
daysinmonth
Return the number of days in the month.
is_leap_year
Return True if year is a leap year.
is_month_end
Check if the date is the last day of the month.
is_month_start
Check if the date is the first day of the month.
is_quarter_end
Check if date is last day of the quarter.
is_quarter_start
Check if the date is the first day of the quarter.
is_year_end
Return True if date is last day of the year.
is_year_start
Return True if date is first day of the year.
microsecond
minute
month
nanosecond
quarter
Return the quarter of the year.
resolution
second
Alias for tzinfo.
tzinfo
The abbreviation associated with self._creso.
value
Return the week number of the year.
weekofyear
Return the week number of the year.
Convert timezone-aware Timestamp to another time zone.
ceil
(freq[, ambiguous, nonexistent])
Return a new Timestamp ceiled to this resolution.
combine
(date, time)
Combine date, time into datetime with same date and time fields.
ctime
()
Return ctime() style string.
date
()
Return date object with same year, month and day.
day_name
([locale])
Return the day name of the Timestamp with specified locale.
dst
()
Return the daylight saving time (DST) adjustment.
floor
(freq[, ambiguous, nonexistent])
Return a new Timestamp floored to this resolution.
fromisocalendar
int, int, int -> Construct a date from the ISO year, week number and weekday.
fromisoformat
string -> datetime from datetime.isoformat() output
fromordinal
(ordinal[, tz])
Construct a timestamp from a a proleptic Gregorian ordinal.
fromtimestamp
(ts)
Transform timestamp[, tz] to tz's local time from POSIX timestamp.
isocalendar
()
Return a named tuple containing ISO year, week number, and weekday.
isoformat
([sep, timespec])
Return the time formatted according to ISO 8601.
isoweekday
()
Return the day of the week represented by the date.
month_name
([locale])
Return the month name of the Timestamp with specified locale.
normalize
()
Normalize Timestamp to midnight, preserving tz information.
now
([tz])
Return new Timestamp object representing current time local to tz.
replace
([year, month, day, hour, minute, ...])
Implements datetime.replace, handles nanoseconds.
round
(freq[, ambiguous, nonexistent])
Round the Timestamp to the specified resolution.
strftime
(format)
Return a formatted string of the Timestamp.
strptime
(string, format)
Function is not implemented.
time
()
Return time object with same time but with tzinfo=None.
timestamp
()
Return POSIX timestamp as float.
timetuple
()
Return time tuple, compatible with time.localtime().
timetz
()
Return time object with same time and tzinfo.
to_datetime64
()
Return a numpy.datetime64 object with same precision.
to_julian_date
()
Convert TimeStamp to a Julian Date.
to_numpy
([dtype, copy])
Convert the Timestamp to a NumPy datetime64.
to_period
([freq])
Return an period of which this timestamp is an observation.
to_pydatetime
([warn])
Convert a Timestamp object to a native Python datetime object.
today
([tz])
Return the current time in the local timezone.
toordinal
()
Return proleptic Gregorian ordinal.
tz_convert
(tz)
Convert timezone-aware Timestamp to another time zone.
tz_localize
(tz[, ambiguous, nonexistent])
Localize the Timestamp to a timezone.
tzname
()
Return time zone name.
utcfromtimestamp
(ts)
Construct a timezone-aware UTC datetime from a POSIX timestamp.
utcnow
()
Return a new Timestamp representing UTC day and time.
utcoffset
()
Return utc offset.
utctimetuple
()
Return UTC time tuple, compatible with time.localtime().
weekday
()
Return the day of the week represented by the date.