I have a dataframe which has a datetime column:
Date
2020-01-01 00:00:00
...
2020-02-29 23:45:00
How can convert this to the format:
Date
2020-01-01 0
...
2020-02-29 23
I tried: df['hour'] = df['Date'].dt.day+ " "+df['Date'].dt.hour
but this lets to:
TypeError: unsupported operand type(s) for +: 'datetime.date' and 'str'