-
Notifications
You must be signed in to change notification settings - Fork 14k
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
fix: 'DataFrame' object has no attribute 'ix' #12092
Conversation
File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/local/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise raise value File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/usr/local/lib/python3.7/site-packages/flask_appbuilder/security/decorators.py", line 109, in wraps return f(self, *args, **kwargs) File "/app/superset/utils/log.py", line 164, in wrapper value = f(*args, **kwargs) File "/app/superset/views/core.py", line 2037, in extra_table_metadata mydb, table_name, parsed_schema File "/app/superset/db_engine_specs/presto.py", line 734, in extra_table_metadata table_name, schema_name, database, show_first=True File "/usr/local/lib/python3.7/site-packages/flask_caching/__init__.py", line 907, in decorated_function rv = f(*args, **kwargs) File "/app/superset/db_engine_specs/presto.py", line 977, in latest_partition return column_names, cls._latest_partition_from_df(df) File "/app/superset/db_engine_specs/hive.py", line 435, in _latest_partition_from_df return [df.ix[:, 0].max().split("=")[1]] File "/usr/local/lib/python3.7/site-packages/pandas/core/generic.py", line 5139, in __getattr__ return object.__getattribute__(self, name) AttributeError: 'DataFrame' object has no attribute 'ix'
Codecov Report
@@ Coverage Diff @@
## master #12092 +/- ##
==========================================
+ Coverage 77.04% 82.05% +5.00%
==========================================
Files 1041 362 -679
Lines 56068 29112 -26956
Branches 7742 0 -7742
==========================================
- Hits 43198 23888 -19310
+ Misses 12612 5224 -7388
+ Partials 258 0 -258
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thanks so much for fixing this!
@minzhang2110 apologies for this having been buried in the PR backlog. I rebased the PR and will merge once CI passes. |
For additional context, |
File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/local/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise raise value File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/usr/local/lib/python3.7/site-packages/flask_appbuilder/security/decorators.py", line 109, in wraps return f(self, *args, **kwargs) File "/app/superset/utils/log.py", line 164, in wrapper value = f(*args, **kwargs) File "/app/superset/views/core.py", line 2037, in extra_table_metadata mydb, table_name, parsed_schema File "/app/superset/db_engine_specs/presto.py", line 734, in extra_table_metadata table_name, schema_name, database, show_first=True File "/usr/local/lib/python3.7/site-packages/flask_caching/__init__.py", line 907, in decorated_function rv = f(*args, **kwargs) File "/app/superset/db_engine_specs/presto.py", line 977, in latest_partition return column_names, cls._latest_partition_from_df(df) File "/app/superset/db_engine_specs/hive.py", line 435, in _latest_partition_from_df return [df.ix[:, 0].max().split("=")[1]] File "/usr/local/lib/python3.7/site-packages/pandas/core/generic.py", line 5139, in __getattr__ return object.__getattribute__(self, name) AttributeError: 'DataFrame' object has no attribute 'ix' Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File "/usr/local/lib/python3.7/site-packages/flask_appbuilder/security/decorators.py", line 109, in wraps
return f(self, *args, **kwargs)
File "/app/superset/utils/log.py", line 164, in wrapper
value = f(*args, **kwargs)
File "/app/superset/views/core.py", line 2037, in extra_table_metadata
mydb, table_name, parsed_schema
File "/app/superset/db_engine_specs/presto.py", line 734, in extra_table_metadata
table_name, schema_name, database, show_first=True
File "/usr/local/lib/python3.7/site-packages/flask_caching/init.py", line 907, in decorated_function
rv = f(*args, **kwargs)
File "/app/superset/db_engine_specs/presto.py", line 977, in latest_partition
return column_names, cls._latest_partition_from_df(df)
File "/app/superset/db_engine_specs/hive.py", line 435, in _latest_partition_from_df
return [df.ix[:, 0].max().split("=")[1]]
File "/usr/local/lib/python3.7/site-packages/pandas/core/generic.py", line 5139, in getattr
return object.getattribute(self, name)
AttributeError: 'DataFrame' object has no attribute 'ix'
SUMMARY
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TEST PLAN
ADDITIONAL INFORMATION