Pandas version checks

  • [X] I have checked that the issue still exists on the latest versions of the docs on main here

Location of the documentation

https://pandas.pydata.org/docs/dev/reference/api/pandas.tseries.offsets.Week.html

Documentation problem

Documentation for pandas.tseries.offsets.Week needs better explanation for the weekday parameter.

First of all, Pandas’ Monday==0 is incompatible with universal strftime("%w") where Saunday==0.

To make it compatible right now will brake a lot of user code, so the workaround would be to improve documentation. But to make Week behave as Sunday==0, you have to pass weekday=5 (Saturday) which is quite confusing.

Suggested fix for documentation

Suggested documentation (at least for my case, where I need to use it in resamples):

weekday: last day of the week, where 0=Monday and 6=Sunday

Comment From: akshay-babbar

Hey @avibrazil, the documentation does contain 'Always generate specific day of week. 0 for Monday'. You think this is not enough? I can take this as i am new to open source though. `

Comment From: MarcoGorelli

Hey @akshay-babbar - if you think this could be clarified, feel free to submit a PR. I think an example in the docstring might be useful

Comment From: akshay-babbar

take

Comment From: akshay-babbar

Hey @MarcoGorelli, sorry for getting back late on this, but i have opened a PR here. I have added few examples to explain it better. Please have a look.

Thanks.