-
Notifications
You must be signed in to change notification settings - Fork 29k
Minor fix to SPARK-6958: Improve Python docstring for DataFrame.sort. #5558
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
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.
In Python, it's called bool
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 think bool is the name of the function, but the data type is still boolean?
see
https://docs.python.org/2/library/stdtypes.html#boolean-values
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.
The type for boolean is bool:
>>> type(True)
<type 'bool'>
>>> type(1)
<type 'int'>
Similar to int for integer.
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.
It's weird to see we put boolean and int together, it should be either boolean/integer or bool/int.
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.
Alright I removed int, since 1, 0 has the same value as True, False anyway.
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.
Could you also change the tests in doc string to use True and False?
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.
then that's different from the Pandas examples?
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.
yeah, no perfect.
|
Test build #30488 has finished for PR 5558 at commit
|
|
Test build #30498 has finished for PR 5558 at commit
|
|
LGTM. |
As a follow up PR to #5544.
cc @davies