-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
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
DOC: Add examples to Series operators (#24589) #32704
DOC: Add examples to Series operators (#24589) #32704
Conversation
adds documentation example to: - `pandas.Series.eq` - `pandas.Series.ne` - `pandas.Series.gt`, - `pandas.Series.ge` - `pandas.series.le` - `pandas.series.lt`
Thanks for working on this @sullivanbt What do you think about having in a variable the creation of the _ne_example_SERIES = _common_examples_SERIES + """
>>> a.ne(b, fill_value=0)
... This would save a decent amount of repeated code. |
Thanks for the suggestion @datapythonista - I updated the branch with 926a3cf to include that. |
Cool. May be it would make sense to rename Did you render one of the pages to html? Would be good to render at least one of each (algebra/comparison), to make sure there are not too many or two few blank lines... If you can post couple of screenshots even better. Good job, nice improvement. |
reanamed `_common_examples_SERIES` to more descriptive `_common_examples_algebra_SERIES`
Completely agree that I've attached two screenshots - one from the algebra examples one from the comparison. I believe this is how they should be rendering (same as the existing examples) but let me know if not. Thanks again for your feedback. |
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.
Really cool @sullivanbt, looks perfect.
I'll let another maintainer merge, so we have couple of eyes on this, but this should be ready. Thanks!
Thanks @sullivanbt! |
Further work on #24589. PR #25524 added examples for many operations but not
pandas.Series.eq
,pandas.Series.ne
,pandas.Series.gt
,pandas.Series.ge
,pandas.series.le
, andpandas.series.lt
. This adds examples for those.pandas.Series.divmod
is still missing an example as discussed in #25524.