Skip to content
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

Support axis=1 for DataFrame.dropna(). #1689

Merged
merged 3 commits into from Aug 3, 2020
Merged

Conversation

ueshin
Copy link
Collaborator

@ueshin ueshin commented Jul 31, 2020

Adding support axis=1 or axis='column' for DataFrame.dropna().

>>> kdf = ks.DataFrame({"name": ['Alfred', 'Batman', 'Catwoman'],
...                     "toy": [None, 'Batmobile', 'Bullwhip'],
...                     "born": [None, "1940-04-25", None]},
...                    columns=['name', 'toy', 'born'])
>>> kdf
       name        toy        born
0    Alfred       None        None
1    Batman  Batmobile  1940-04-25
2  Catwoman   Bullwhip        None
>>> kdf.dropna(axis='columns')
       name
0    Alfred
1    Batman
2  Catwoman

Resolves #1053.

@ueshin ueshin requested a review from HyukjinKwon July 31, 2020 01:29
@itholic
Copy link
Contributor

itholic commented Jul 31, 2020

LGTM.

@HyukjinKwon HyukjinKwon merged commit c98557a into databricks:master Aug 3, 2020
@ueshin ueshin deleted the dropna branch August 3, 2020 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DataFrame.dropna(axis=1)
3 participants