Skip to content

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

Open
@MarcoGorelli

Description

@MarcoGorelli

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

Metadata

Metadata

Assignees

Labels

DeprecateFunctionality to remove in pandasFrequencyDateOffsets

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions