-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Conversation
py-polars/polars/dataframe/frame.py
Outdated
# pandas | ||
df.drop_duplicates(["a", "b"]) | ||
|
||
though note that the output ordering is not stable unless |
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.
Maybe remove the "though" and just say "Note that..."? The "though" feels a bit awkward.
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.
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?
344fd29
to
63daa27
Compare
sure thing, thanks, have shortened |
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
DataFrame.unique
docstring
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 😎