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

Add errors argument for groupby.sample to ignore errors when group size less than n #2002

Merged
merged 3 commits into from
Feb 25, 2021

Conversation

wjsi
Copy link
Member

@wjsi wjsi commented Feb 24, 2021

What do these changes do?

Add errors argument for groupby.sample to ignore errors when group size less than n. This also adapts logic from pandas groupby.sample and then bugs of weighted sampling in pandas will not affect Mars.

Related issue number

Fixes #2000

@wjsi wjsi added type: bug Something isn't working mod: dataframe to be backported Indicate that the PR need to be backported to stable branch labels Feb 24, 2021
@wjsi wjsi added this to the v0.7.0a7 milestone Feb 24, 2021
@wjsi wjsi added this to PR-In progress in v0.7 Release via automation Feb 24, 2021
@wjsi wjsi added this to In progress in DataFrame via automation Feb 24, 2021
@wjsi wjsi force-pushed the bugfix/groupby_sample_error branch from 3900631 to b4e48b9 Compare February 24, 2021 15:10
@wjsi wjsi marked this pull request as ready for review February 25, 2021 04:18
Copy link
Collaborator

@qinxuye qinxuye left a comment

Choose a reason for hiding this comment

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

LGTM

DataFrame automation moved this from In progress to Reviewer approved Feb 25, 2021
@qinxuye qinxuye merged commit 852b331 into mars-project:master Feb 25, 2021
DataFrame automation moved this from Reviewer approved to Done Feb 25, 2021
v0.7 Release automation moved this from PR-In progress to PR-Done Feb 25, 2021
@qinxuye qinxuye modified the milestones: v0.7.0a7, v0.7.0a6 Feb 25, 2021
@wjsi wjsi deleted the bugfix/groupby_sample_error branch February 25, 2021 05:56
wjsi added a commit to wjsi/mars that referenced this pull request Feb 25, 2021
wjsi added a commit to wjsi/mars that referenced this pull request Feb 25, 2021
qinxuye pushed a commit that referenced this pull request Feb 25, 2021
@qinxuye qinxuye added backported already PR has been backported and removed to be backported Indicate that the PR need to be backported to stable branch labels Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported already PR has been backported mod: dataframe type: bug Something isn't working
Projects
DataFrame
  
Done
Development

Successfully merging this pull request may close these issues.

Add options to ignore errors when sample size is greater than group size
2 participants