year: int64
month: float64
day: float64
hour: object
minute: object
I'm trying to make a date by combining these columns, but I keep getting an error. I don’t know what I should do.
Here are my code and error.
r_datetime = pd.to_datetime(
str(int(df['year'])) \
+ '-' + str(int(df['month'])) \
+ '-' + str(int(df['day'])) \
+ ' ' + str(int(df['hour'])) \
+ ':' + str(int(df['minute']))
)
TypeError: cannot convert the series to <class 'int'>
astype(str) is also getting error. i don't know what should i do.
Thank you for your help.