-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-5464] Fix help() for Python DataFrame instances #4278
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
[SPARK-5464] Fix help() for Python DataFrame instances #4278
Conversation
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.
I don't think we need this check because getattr can only be called with strings:
>>> foo = []
>>> getattr(foo, 123)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: getattr(): attribute name must be string|
Test build #26341 has started for PR 4278 at commit
|
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.
Row already had this check in its __getattr__ call, so I think it's safe to do the same thing here, too.
|
cc @davies |
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.
This is the case that threw an exception. The other two cases below are just to improve our test-coverage, since those classes also have custom __getattr__ methods.
|
This looks good to me, thanks for fix them. |
|
Test build #26341 has finished for PR 4278 at commit
|
|
Test PASSed. |
|
Thanks. merging this in master! |
This fixes an exception that prevented users from calling
help()on Python DataFrame instances.