-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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 DataFrame et al class docstring to api docs #5160
DOC: add DataFrame et al class docstring to api docs #5160
Conversation
Example of how is |
sexy! small aside, is there a way to not include/indicate deprecated (e.g. to_wide,save,load)? |
@jreback I don't think that can be directly done. In principle these could be added to Another possibility would be to add a docstring to eg |
@jorisvandenbossche this looks fine....you could add will have to go over the resulting doc strings to look for things that don't look right after this is merged...... |
@jorisvandenbossche this an #5124 are somewhat orthogonal yes? |
@jorisvandenbossche I get a bunch of errors and warnings like |
@jreback No, I think this PR and #5124 are complementary. First, #5124 just includes some extra docs on string methods to the API section. And secondly @JanSchulz created a notebook to inspect which methods are not yet included in api.rst (and this list is not included in the wiki). This is a handy list for further work on making api.rst more complete, while this PR adds some classes to api.rst and will ensure the methods of these classes have generated pages to which can be referenced from the docs. But still, it would also be good to explicitly mention them in api.rst (but that's is a lot more work). @cpcloud Yes, indeed. That's because the attributes are for some reason not included in the generated class pages. E.g. for |
@jorisvandenbossche ok...let us know when resolved so can merge |
I also added a commit to add But I get some warnings and errors when building the docs now, like |
It's because it's a cython function (I guess). Might just need to write that in explicitly? |
@jtratner It is a python class, but in a cython file. And I get the warning for all function that are defined there (https://github.com/pydata/pandas/blob/master/pandas/tslib.pyx#L130) Not for the inherited functions of It seems that the generated docstring pages are there with the docstring rendered, but that Sphinx could not detect the signature. And it generates warnings when building the docs. |
@jorisvandenbossche merge? |
@jorisvandenbossche actually pls squash first |
Well, most is solved but there is still an issues. My last commit (adding I can squash the other commits and leave that that one for another PR? |
@jorisvandenbossche that is fine.... |
+ add template class.rst (copied from numpy) + adapt sphinxext numpydoc (was outdated, attributes not included)
@jreback done! (rebased and squashed, I will open an issue for the timestamp docs) |
DOC: add DataFrame et al class docstring to api docs
thanks |
closes #4790
I copied the approach of numpy: extending the autosummary class template to automatically generate all method stub files:
I added
DataFrame
,Series
,Panel
,Index
andDatetimeIndex
. Others? (egTimestamp
) Or too much?The only issue at the moment is that normally also a list of attributes should be included, which is not the case (only a list of methods)