0

Hi I have a pandas datetime object that I want to extract the day, month, year out of it.

print(data)
1   2012-09-21
2   2012-09-28
3   2012-10-05
4   2012-10-12
5   2012-10-19
6   2012-10-26
Name: Date, Length: 143, dtype: datetime64[ns]

data.day
AttributeError: 'Series' object has no attribute 'day'

Any help on this one? Thanks

Miguel Santos
  • 1,806
  • 3
  • 17
  • 30

0 Answers0