Reputation: 35
I have a dataframe that contains a series of dates, e.g.:
0 2014-06-17
1 2014-05-05
2 2014-01-07
3 2014-06-29
4 2014-03-15
5 2014-06-06
7 2014-01-29
What I would like to do is convert these dates to integers
by the month
, since all the values are within the same year. So I would like to get something like this:
0 6
1 5
2 1
3 6
4 3
5 6
7 1
Is there a quick way to do this with Pandas?
EDIT: Answered by jezrael. Thanks so much!
Upvotes: 1
Views: 1009