Comment convertir un index pandas de chaînes au format datetime
mon dataframe 'df' est comme ça
value
2015-09-25 00:46 71.925000
2015-09-25 00:47 71.625000
2015-09-25 00:48 71.333333
2015-09-25 00:49 64.571429
2015-09-25 00:50 72.285714
mais l'index est de type chaîne, mais j'en ai besoin d'un format datetime car j'obtiens l'erreur
'Index' object has no attribute 'hour'
lors de l'utilisation
df['A'] = df.index.hour