pandas.Timestamp.combine#

classmethod Timestamp.combine(date, time)#

Combine a date and time into a single Timestamp object.

This method takes a date object and a time object and combines them into a single Timestamp that has the same date and time fields.

Parameters:
datedatetime.date

The date part of the Timestamp.

timedatetime.time

The time part of the Timestamp.

Returns:
Timestamp

A new Timestamp object representing the combined date and time.

See also

Timestamp

Represents a single timestamp, similar to datetime.

to_datetime

Converts various types of data to datetime.

Examples

>>> from datetime import date, time
>>> pd.Timestamp.combine(date(2020, 3, 14), time(15, 30, 15))
Timestamp('2020-03-14 15:30:15')