-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
startingMonth ignored on non-unitary Quarter periods #29576
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
Comments
This looks to work on main now. Could use a test |
take |
I am currently using version 2.0.1 of Pandas and this specific problem isn’t fixed. |
take |
Did some digging and i think it is because of the implementation of offset. offset = QuarterBegin(startingMonth=1, n=2) #2QS
dt = pd.Timestamp("1950-01-02")
offset.rollback(dt), offset.rollforward(dt) and offset = QuarterBegin(startingMonth=1, n=1) #QS
dt = pd.Timestamp("1950-01-02")
offset.rollback(dt), offset.rollforward(dt) both return @mroeschke please confirm if this is expected or not. |
take |
Code Sample
returns:
But as I explicitly asked for 2 Quarters starting in March, I expected:
So, when specifying a multiple, the first time still goes to the closest single quarter before.
Not really a duplicate, but closely related to #22362.
Output of
pd.show_versions()
pandas : 0.25.3
numpy : 1.17.3
pytz : 2019.3
dateutil : 2.8.1
pip : 9.0.1
setuptools : 39.0.1
Cython : None
pytest : 5.2.2
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.4.1
html5lib : 0.999999999
pymysql : None
psycopg2 : None
jinja2 : 2.10.3
IPython : 7.9.0
pandas_datareader: None
bs4 : 4.8.1
bottleneck : 1.2.1
fastparquet : None
gcsfs : None
lxml.etree : 4.4.1
matplotlib : 3.1.1
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pytables : None
s3fs : None
scipy : 1.3.1
sqlalchemy : None
tables : None
xarray : 0.13.0
xlrd : None
xlwt : None
xlsxwriter : None
The text was updated successfully, but these errors were encountered: