-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Grouper: Origin param has no effect #47653
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
take |
@houseofai For the second grouper, first start day which printed should be |
@hamedgibago Yes, thanks |
Any news on this? If triage has been done could an update be given on whether it is a confirmed bug? Thanks. |
not a bug W is an anchored offset which starts on monday; you can use W-TUES for example as well |
@jreback thanks a lot for the reply, my apologies for the time used for the correction. |
throws |
@houseofai did you try |
@DBCerigo Thanks for pointing out, indeed
Gives:
Note that the first date, The only way to start the week from the first date is to find the day of the first date (here
Could you please confirm that is the expected behavior with the frequency parameter? And I insist but the |
Looking at #31809, it appears to me |
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
Whatever I set on the
origin
parameter ofpd.Grouper
, whether it isstart
or a date, it groups by starting on a Monday.If I remove the
origin
parameter, I get the same results.Expected Behavior
The data are grouped weekly starting by the fixed timestamp provided by the origin parameter.
Installed Versions
INSTALLED VERSIONS
commit : e8093ba
python : 3.8.13.final.0
python-bits : 64
OS : Darwin
OS-release : 21.5.0
Version : Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:37 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T6000
machine : arm64
processor : arm
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.UTF-8
pandas : 1.4.3
numpy : 1.21.6
pytz : 2022.1
dateutil : 2.8.2
setuptools : 61.2.0
pip : 21.2.4
Cython : 0.29.30
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.9.0
html5lib : None
pymysql : 1.0.2
psycopg2 : None
jinja2 : 3.1.1
IPython : 8.2.0
pandas_datareader: None
bs4 : 4.9.1
bottleneck : None
brotli : None
fastparquet : None
fsspec : 2022.5.0
gcsfs : None
markupsafe : 2.1.1
matplotlib : 3.5.2
numba : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 8.0.0
pyreadstat : None
pyxlsb : None
s3fs : 2022.5.0
scipy : 1.8.0
snappy : None
sqlalchemy : 1.4.32
tables : None
tabulate : 0.8.10
xarray : None
xlrd : None
xlwt : None
zstandard : None
The text was updated successfully, but these errors were encountered: