-
Notifications
You must be signed in to change notification settings - Fork 327
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 md.get_dummies() #2323
Support md.get_dummies() #2323
Conversation
A simple test below failed: df = md.DataFrame(mt.random.choice(['a', 'b', 'c'], (100, 2), chunk_size=10))
# Length of 'prefix' (3) did not match the length of the columns being encoded (0)
md.get_dummies(df, prefix=['col1', 'col2']).execute() while it works in pandas: df = pd.DataFrame(np.random.choice(['a', 'b', 'c'], (100, 2)))
pd.get_dummies(df, prefix=['col1', 'col2']) |
Seems |
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 tile logic seems not be efficient for me, there is still room for improvement.
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.
LGTM
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.
LGTM
Co-authored-by: hekaisheng <[email protected]>
What do these changes do?
This PR added support for
DataFrame.get_dummies()
.Related issue number
Resolves #570