0

I have a df with dates like:

date       
2022-01-01 
2022-01-13 
2022-03-29 

Now, I would like to get the week within that month index from these dates such as:

date       | week_index (week within that month, cannot be >4)
2022-01-01 | 1
2022-01-13 | 2
2022-03-29 | 4
etc.

Is there a simple way to do this in pandas?

titutubs
  • 355
  • 1
  • 9

0 Answers0