Skip to content

[DataFrame] Fixes dropna subset bug #2018

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

Merged
merged 2 commits into from
May 10, 2018

Conversation

kunalgosar
Copy link
Contributor

@kunalgosar kunalgosar commented May 9, 2018

This fixes the bug where subset was not used correctly when passed into df.dropna.

@kunalgosar kunalgosar changed the title [DataFrame] Fixes dropna and adds axis utilities [DataFrame] Fixes dropna subset bug May 9, 2018
@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/5283/
Test FAILed.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/5284/
Test PASSed.

Copy link
Member

@devin-petersohn devin-petersohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor fix, thanks for getting this in!

if how is not None and how not in ['any', 'all']:
raise ValueError('invalid how option: %s' % how)
if how is None and thresh is None:
raise TypeError('must specify how or thresh')

if subset is not None:
subset = set(subset)
axis = pd.DataFrame()._get_axis_number(axis)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to get moved back:

In [3]: df2.dropna(axis=12, how='whatever')
ValueError: No axis named 12 for object type <class 'pandas.core.frame.DataFrame'>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved below.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/5301/
Test PASSed.

@devin-petersohn devin-petersohn merged commit b79912e into ray-project:master May 10, 2018
alok added a commit to alok/ray that referenced this pull request May 11, 2018
* master:
  [xray] Fix UniqueID hashing for object and task IDs. (ray-project#2017)
  [DataFrame] Fixing bugs in groupby (ray-project#2031)
  [DataFrame] Fixes dropna subset bug (ray-project#2018)
alok added a commit to alok/ray that referenced this pull request May 11, 2018
* master:
  [xray] Fix UniqueID hashing for object and task IDs. (ray-project#2017)
  [DataFrame] Fixing bugs in groupby (ray-project#2031)
  [DataFrame] Fixes dropna subset bug (ray-project#2018)
  [DataFrame] Implement where (ray-project#1989)
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.

3 participants