Skip to content

DEPR: freq ''2BQ-SEP" for to_period should raise an error #56899

@natmokval

Description

@natmokval

on the latest main this

>>> rng = pd.date_range('01-Jan-2012', periods=8, freq='2BQ-SEP') <stdin>:1: FutureWarning: 'BQ-SEP' is deprecated and will be removed in a future version, please use 'BQE-SEP' instead. >>> rng.to_period() 

works as

PeriodIndex(['2012Q1', '2012Q3', '2013Q1', '2013Q3', '2014Q1', '2014Q3', '2015Q1', '2015Q3'], dtype='period[2Q-DEC]') 

While before it raised an error

AttributeError: 'pandas._libs.tslibs.offsets.BQuarterEnd' object has no attribute '_period_dtype_code' 

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