-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DataFrameGroupBy fillna swallows exceptions. #14955
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
Labels
Milestone
Comments
xref to https://github.com/pandas-dev/pandas/pull/6338/files we do raise when using apply like this.
This might be quite tricky though to differentiate between a dtype incompat (e.g. ignoring a column) and a 'real' error. e.g the same path is hit for
|
please have a look see and see what can be done |
moonshoes87
added a commit
to PmagPy/PmagPy
that referenced
this issue
Dec 5, 2017
Looks to raise correctly on master. Could use a test.
|
10 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem description
Doing a fillna on DataFrameGroupBy fails silently - returning an empty dataframe, rather than raising what the error is.
This often masks the actual problem (e.g. errors like
ValueError: Tz-aware datetime.datetime cannot be converted to datetime64 unless utc=True
when handling tz-aware data.)Code Sample, a copy-pastable example if possible
Expected Output
ValueError: must specify a fill method or value
Output of
pd.show_versions()
pandas: 0.19.1
nose: 1.3.7
pip: 1.5.6
setuptools: 25.1.1
Cython: 0.23.2
numpy: 1.11.1
scipy: 0.14.0
statsmodels: 0.6.1
xarray: None
IPython: 2.3.1
sphinx: None
patsy: 0.4.1
dateutil: 2.5.3
pytz: 2016.6.1
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: 1.4.3
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: 0.999
httplib2: 0.9
apiclient: 1.1
sqlalchemy: None
pymysql: None
psycopg2: 2.6.1 (dt dec pq3 ext lo64)
jinja2: 2.7.3
boto: 2.26.0
pandas_datareader: None
The text was updated successfully, but these errors were encountered: