Skip to content

DEPR: rename startingMonth to starting_month (argument in BQuarterBegin) #57794

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
MarcoGorelli opened this issue Mar 10, 2024 · 1 comment
Assignees
Labels
Deprecate Functionality to remove in pandas Frequency DateOffsets

Comments

@MarcoGorelli
Copy link
Member

MarcoGorelli commented Mar 10, 2024

Renamings should be done with care, but this one strikes me as especially odd

pandas.tseries.offsets.QuarterBegin(startingMonth=1)

It looks very odd in Python to have a camelcase argument name...I thought this was probably a typo in the docs when I saw it, but no, it runs

OK with deprecating in favour of starting_month?

I think this is the only place in pandas where this happens:

$ git grep -E ' [a-z]+[A-Z][a-z]+: ' pandas
pandas/_libs/tslibs/offsets.pyi:        self, n: int = ..., normalize: bool = ..., startingMonth: int | None = ...
pandas/_libs/tslibs/offsets.pyi:        startingMonth: int = ...,
pandas/_libs/tslibs/offsets.pyi:        startingMonth: int = ...,
$ git grep -E ' [a-z]+[A-Z][a-z]+ : ' pandas
pandas/_libs/tslibs/offsets.pyx:    startingMonth : int, default 3
pandas/_libs/tslibs/offsets.pyx:    startingMonth : int, default 3
pandas/_libs/tslibs/offsets.pyx:    startingMonth : int, default 3
pandas/_libs/tslibs/offsets.pyx:    startingMonth : int, default 3
pandas/_libs/tslibs/offsets.pyx:    startingMonth : int {1, 2, ... 12}, default 1
pandas/_libs/tslibs/offsets.pyx:    startingMonth : int {1, 2, ..., 12}, default 1
@MarcoGorelli MarcoGorelli added Frequency DateOffsets Deprecate Functionality to remove in pandas labels Mar 10, 2024
@gboeker
Copy link
Contributor

gboeker commented Apr 1, 2024

take

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas Frequency DateOffsets
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants