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

docs(python): Add "coming from pandas" note to DataFrame.unique docstring #17119

Merged
merged 2 commits into from
Jun 22, 2024

Conversation

MarcoGorelli
Copy link
Collaborator

The most upvoted SO Polars question is about drop_duplicates: https://stackoverflow.com/questions/71196661/what-is-the-equivalent-of-dataframe-drop-duplicates-from-pandas-in-polars

Let's insert a cheeky drop_duplicates mention so that people can be directed to the Polars equivalent 😎

@github-actions github-actions bot added documentation Improvements or additions to documentation python Related to Python Polars labels Jun 21, 2024
@MarcoGorelli MarcoGorelli marked this pull request as ready for review June 21, 2024 20:17
# pandas
df.drop_duplicates(["a", "b"])

though note that the output ordering is not stable unless
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe remove the "though" and just say "Note that..."? The "though" feels a bit awkward.

Copy link
Member

@stinodego stinodego left a comment

Choose a reason for hiding this comment

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

I think it's indeed a good idea to mention drop_duplicates here. But I think the note can be a lot shorter and just mention "This method is similar to drop_duplicates in pandas.". Do we need two code blocks here?

@MarcoGorelli
Copy link
Collaborator Author

sure thing, thanks, have shortened

Copy link

codecov bot commented Jun 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.85%. Comparing base (88cfb23) to head (63daa27).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17119      +/-   ##
==========================================
- Coverage   80.88%   80.85%   -0.03%     
==========================================
  Files        1456     1456              
  Lines      191155   191311     +156     
  Branches     2731     2737       +6     
==========================================
+ Hits       154611   154684      +73     
- Misses      36038    36121      +83     
  Partials      506      506              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@stinodego stinodego changed the title docs(python): add "coming from pandas" note to DataFrame.unique docs(python): Add "coming from pandas" note to DataFrame.unique docstring Jun 22, 2024
@stinodego stinodego merged commit a99b234 into pola-rs:main Jun 22, 2024
15 checks passed
Wouittone pushed a commit to Wouittone/polars that referenced this pull request Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation python Related to Python Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants