-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Add section on using in operator with Series, DataFrame #6433
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
Conversation
|
||
>>> s = pd.Series(range(5), index=list('abcde')) | ||
>>> 2 in s | ||
>>> b in s |
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.
If you want that the output of the code is generated automatically, then you have to change .. code-block::
to .. ipython::
, and leave out the >>>
(the ipython_directive, see http://pandas.pydata.org/pandas-docs/stable/contributing.html#about-the-pandas-documentation).
Off course you can also use code-block
, but then you need to paste the exact console input and output in there.
Revised. Thanks, @jorisvandenbossche . |
can u add a reference to this section thanks |
@jorisvandenbossche looks fine to me |
|
||
s = pd.Series(range(5), index=list('abcde')) | ||
2 in s | ||
b in s |
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.
Should be a string? ('b'
)
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.
Yes. I'll set up doc building on my local machine so I check these things. Sorry for putting you through so many iterations on this.
I haven't got sphinx working on pandas locally, so I haven't verified this. But the issues discussed above have been fixed. |
Looking good (and you can always see the result after a while on http://pandas-docs.github.io/pandas-docs-travis/ to check if everything is OK). Thanks! |
DOC: Add section on using in operator with Series, DataFrame
closes #5571