We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
data:
idx = pd.date_range('2017-1-1','2018-12-31',freq='M') df = pd.DataFrame(np.arange(len(idx)),idx)
resample:
df.resample('3m',kind='period').sum()
use grouper:
df.groupby(pd.Grouper(level=0,freq='3m',kind='period')).sum()
Why are the results different?
I hope that the result of using the grouper is the same as the resample method.
thank you!!
pd.show_versions()
commit : None python : 3.7.3.final.0 python-bits : 64 OS : Windows OS-release : 10 machine : AMD64 processor : Intel64 Family 6 Model 58 Stepping 9, GenuineIntel byteorder : little LC_ALL : None LANG : None LOCALE : None.None
pandas : 0.25.0 numpy : 1.16.2 pytz : 2018.9 dateutil : 2.8.0 pip : 19.0.3 setuptools : 40.8.0 Cython : 0.29.6 pytest : 4.3.1 hypothesis : None sphinx : 1.8.5 blosc : None feather : 0.4.0 xlsxwriter : 1.1.5 lxml.etree : 4.3.2 html5lib : 1.0.1 pymysql : None psycopg2 : None jinja2 : 2.10 IPython : 7.4.0 pandas_datareader: None bs4 : 4.7.1 bottleneck : 1.2.1 fastparquet : None gcsfs : None lxml.etree : 4.3.2 matplotlib : 3.0.3 numexpr : 2.6.9 odfpy : None openpyxl : 2.6.1 pandas_gbq : None pyarrow : 0.13.0 pytables : None s3fs : None scipy : 1.2.1 sqlalchemy : 1.3.1 tables : 3.5.1 xarray : None xlrd : 1.2.0 xlwt : 1.3.0 xlsxwriter : 1.1.5
The text was updated successfully, but these errors were encountered:
This is probably related to #28302 if you'd like to investigate and submit a PR I think would certainly be welcome
Sorry, something went wrong.
No branches or pull requests
Code Sample, a copy-pastable example if possible
data:
resample:
use grouper:
Problem description
Why are the results different?
Expected Output
I hope that the result of using the grouper is the same as the resample method.
thank you!!
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : None
python : 3.7.3.final.0
python-bits : 64
OS : Windows
OS-release : 10
machine : AMD64
processor : Intel64 Family 6 Model 58 Stepping 9, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.None
pandas : 0.25.0
numpy : 1.16.2
pytz : 2018.9
dateutil : 2.8.0
pip : 19.0.3
setuptools : 40.8.0
Cython : 0.29.6
pytest : 4.3.1
hypothesis : None
sphinx : 1.8.5
blosc : None
feather : 0.4.0
xlsxwriter : 1.1.5
lxml.etree : 4.3.2
html5lib : 1.0.1
pymysql : None
psycopg2 : None
jinja2 : 2.10
IPython : 7.4.0
pandas_datareader: None
bs4 : 4.7.1
bottleneck : 1.2.1
fastparquet : None
gcsfs : None
lxml.etree : 4.3.2
matplotlib : 3.0.3
numexpr : 2.6.9
odfpy : None
openpyxl : 2.6.1
pandas_gbq : None
pyarrow : 0.13.0
pytables : None
s3fs : None
scipy : 1.2.1
sqlalchemy : 1.3.1
tables : 3.5.1
xarray : None
xlrd : 1.2.0
xlwt : 1.3.0
xlsxwriter : 1.1.5
The text was updated successfully, but these errors were encountered: