Skip to content

DOC: GH3850, add .isin to 10min.rst #7239

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

Merged
merged 1 commit into from
May 28, 2014

Conversation

clham
Copy link
Contributor

@clham clham commented May 26, 2014

closes #3850.

Updates 10min.rst to demonstrate isin

@@ -287,6 +287,16 @@ A ``where`` operation for getting.

df[df > 0]

An ``isin`` operation for filtering:
Copy link
Member

Choose a reason for hiding this comment

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

can you add something like using the :func:~Series.isin method (to have the link to the isin docstring page)?

@jorisvandenbossche
Copy link
Member

@clham Thanks for your contribution! I just added some comments.

@jreback jreback added the Docs label May 26, 2014
@clham
Copy link
Contributor Author

clham commented May 26, 2014

Fixed all but using the :func:~Series.isin method -- I can't seem to get any variety of syntax to compile so that the link works. Thanks for the patience on my first --ever-- PR.

@jreback jreback added this to the 0.14.0 milestone May 26, 2014
@cpcloud
Copy link
Member

cpcloud commented May 26, 2014

You may need to put pandas in front of Series

@clham
Copy link
Contributor Author

clham commented May 27, 2014

@cpcloud, I tried that along with a few other syntax. Interestingly, when I compile the docs, many of the Series.xxx links in api.rst also fail to generate (including Series.isin). To skirt it, I can just cut and paste the working (for everyone else) reference from the API file :func:~Series.isin``, but, considering I can't get it to compile properly, it seems unkosher? Thanks again for the patience.

@jorisvandenbossche
Copy link
Member

@clham Do you get any warning or error messages? Because normally this should just work, and also strange that api.rst is not building correctly (what is exactly not working? is it only the link that does not work but it renders well for the rest?)

@clham
Copy link
Contributor Author

clham commented May 27, 2014

Pages render properly, however it looks like the actual docstrings are not being produced. In the Series.xxx sections of api.rst, the only working links are:

Series
Series.values
Series.dtype
Series.ftype
Series.at
series.iat
series.ix
series.loc
series.iloc

Several other sections have similar problems.

The sourcedoc pages do compile, but the body of the page is blank other than the header.

The following is the first error I get when I run python make.py html:

reading sources... [  0%] generated/pandas.DataFrame.__iter__
Traceback (most recent call last):
  File "/home/dev_box/python_virt/pandas/pandas/lib/python3.3/site-packages/sphinx/ext/autodoc.py", line 321, in import_object
    __import__(self.modname)
ImportError: No module named 'pandas.DataFrame

I'm not sure if this is related (or useful), but in ipython, import pandas.DataFrame fails, while from pandas import DataFrame succeeds.

@jorisvandenbossche
Copy link
Member

@clham It is possibly another issue with out python 3 compat for building the docs. See my comment here: #5530 (comment) (first point, seems the same error message). For me this appeared only after rebuilding the docs, not with a clean build.

Can you try a clean build (just do first python make.py clean)? See if it works then?

@clham
Copy link
Contributor Author

clham commented May 27, 2014

@jorisvandenbossche That worked. Also, that link to #5530 was crazy informative.

@jorisvandenbossche
Copy link
Member

OK, @clham, to get this merged, can you first squash the commits? (so you have only one commit for this addition)

You can normally do this with git rebase -i HEAD~4.

Another tip: never merge master in your branch, always rebase (git rebase upstream/master), then you don't get this commits like "Merge remote-tracking branch 'upstream/master' into gh3850"

@jorisvandenbossche
Copy link
Member

BTW, if you find other fixes for the issues with python 3 you encounter (and mentioned in #5530), we are glad to improve this (but I myself am not working with python 3 yet for the docs)

@clham
Copy link
Contributor Author

clham commented May 28, 2014

Well... That was an adventure in git. I think I'm good at this point -- please let me know otherwise.

@jorisvandenbossche
Copy link
Member

Yep, looking good now! Thanks again, and your first PR can be merged :-)

jorisvandenbossche added a commit that referenced this pull request May 28, 2014
DOC: GH3850, add .isin to 10min.rst
@jorisvandenbossche jorisvandenbossche merged commit 2801bdc into pandas-dev:master May 28, 2014
@clham clham deleted the gh3850 branch May 28, 2014 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOC: make isin section in indexing.rst more prominent, maybe add to 10min.rst
4 participants