datetime - combine - python code example
Example 1: datetime year python
import datetime
now = datetime.datetime.now()
print(now.year, now.month, now.day, now.hour, now.minute, now.second)
Example 2: python weekday
df['date_time'].dt.dayofweek #gives only the index(0-monday,6-sunday)
df['date_time'].dt.weekday_name #gives the day