Skip to content

API reference for Series.str, DataFrame.{iloc|loc}? #5068

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

Closed
jankatins opened this issue Oct 1, 2013 · 5 comments · Fixed by #5124
Closed

API reference for Series.str, DataFrame.{iloc|loc}? #5068

jankatins opened this issue Oct 1, 2013 · 5 comments · Fixed by #5124
Labels
Milestone

Comments

@jankatins
Copy link
Contributor

I tried to find the API reference for the methods of Series.str, but they are not linked from http://pandas.pydata.org/pandas-docs/dev/api.html

It seems "new" thingies like df.iloc or df.loc are also not linked from there (DataFrame.ix is!)

@jreback
Copy link
Contributor

jreback commented Oct 2, 2013

PR for this?

@jankatins
Copy link
Contributor Author

This seems not so easy: just adding DataFrame.ix and the rest of the indexer will not show anything informative, as it seems that sphinx (nor ipython) can't handle docstrings for programmaticly added properties (at least DataFrame.iloc.__doc__ is None) (see also the API documentation for the already added DataFrame.ix...) . So it boils down to add a extra paragraph/table which would reference the slicing documentations.

For Series.str it is even stranger: it seems that str is added to the class (as None) but only set to a proper object when you have a Series object. As Sphinx is using the class definition and not a proper object, it throws an error, when Series.str is added to the api documentations :-(

One workaround would be adding Reference to pandas.core.strings.StringMethods directly, but then it would need an introduction as well ("The methods under Series.strare implemented in the following class").

BTW: it seems that the API is not buildable on windows as io.rst is opened as UTF8 (My editors shows it is ASCII) and then fails on the umlauts in there (data = 'word,length\nTr\xe4umen,7\nGr\xfc\xdfe,5). Not sure why, but changing this line to non umlauts made it work for me :-(

@jtratner
Copy link
Contributor

jtratner commented Oct 6, 2013

Dynamic properties on an object aren't really easy to get at in terms of
doc strings (for example, if you try to do Series.index, it will barf). I
think it would be useful to document the string methods, but either we
would need to autodoc it to get in the docstrings and maybe change the name
or, more simply, manually create a page that lists all the string methods
and describes them (even if, for now, it's just copying over the docstrings
for the methods).

@jankatins
Copy link
Contributor Author

So, first try to get that done... Any comments?

@jreback
Copy link
Contributor

jreback commented Oct 15, 2013

closed by #5124

@jreback jreback closed this as completed Oct 15, 2013
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 a pull request may close this issue.

3 participants