-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Inconsistent return type for downsampling on resample of empty DataFrame #14962
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
we do this correctly for groupby, so will mark this as a bug.
|
@jreback I am interested in working on the issue. How do I start? |
@souravsingh I followed this guide provided by the project website. |
I'm a novice and have traced the DateTimeIndexResampler as follows - I couldn't identify the size method , besides the one mentioned in groupby class . Help regarding the same would be welcome. |
Search for |
@jreback @rwarren @jorisvandenbossche is it exactly a bug? There is a test
|
|
Code Sample, a copy-pastable example if possible
Problem description
Code that is resampling a DataFrame that also has some filtering should be able to expect consistent types. My specific case of this causing a problem was that the
size()
output was being forwarded on to other code usingSeries.tolist()
, which obviously fails when the output is a DataFrame.Expected Output
Expectation is that
.size()
should always return aSeries
.Output of
pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 3.5.2.final.0
python-bits: 64
OS: Linux
OS-release: 3.16.0-4-amd64
machine: x86_64
processor:
byteorder: little
LC_ALL: None
LANG: en_CA.utf8
LOCALE: en_CA.UTF-8
pandas: 0.19.1
nose: None
pip: 9.0.1
setuptools: 27.2.0
Cython: None
numpy: 1.11.2
scipy: 0.18.1
statsmodels: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.6.0
pytz: 2016.7
blosc: None
bottleneck: None
tables: None
numexpr: 2.6.1
matplotlib: 1.5.3
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: None
boto: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: