Empty dataframe with groupby when nan column #16217
Labels
Duplicate Report
Duplicate issue or pull request
Error Reporting
Incorrect or improved errors from pandas
Groupby
Missing-data
np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Hi,
I encountered a 'problem' when my program tried to groupby a dataframe with an empty (ie full of nan) column. Here a code sample with pandas 0.19.2 :
I think we could throw a warning (or maybe an error) when this case is encountered in addition to return an empty dataframe.
pandas: 0.19.2
nose: 1.3.7
pip: 9.0.1
setuptools: 27.2.0
Cython: 0.25.2
numpy: 1.11.3
scipy: 0.18.1
statsmodels: 0.6.1
xarray: None
IPython: 5.1.0
sphinx: 1.5.1
patsy: 0.4.1
dateutil: 2.6.0
pytz: 2016.10
blosc: None
bottleneck: 1.2.0
tables: 3.3.0
numexpr: 2.6.1
matplotlib: 2.0.0
openpyxl: 2.4.1
xlrd: 1.0.0
xlwt: 1.2.0
xlsxwriter: 0.9.6
lxml: 3.7.2
bs4: 4.5.3
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 1.1.5
pymysql: 0.7.9.None
psycopg2: None
jinja2: 2.9.4
boto: 2.45.0
pandas_datareader: None
The text was updated successfully, but these errors were encountered: