Skip to content
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

Docs for lurking groupby methods #4500

Closed
cpcloud opened this issue Aug 7, 2013 · 13 comments
Closed

Docs for lurking groupby methods #4500

cpcloud opened this issue Aug 7, 2013 · 13 comments

Comments

@cpcloud
Copy link
Member

cpcloud commented Aug 7, 2013

see this SO question

related: http://stackoverflow.com/questions/21763660/api-ref-missing-dataframegroupby-objects

methods like nunique should be documented; i bet there are more like this that you can see in tab completion but that are valid method calls.

@hayd
Copy link
Contributor

hayd commented Aug 7, 2013

(I think probably worth going through "everything", still quite a lot not online.)

@jreback
Copy link
Contributor

jreback commented Aug 7, 2013

+1 for script that finds non-doced methods?

@cpcloud
Copy link
Member Author

cpcloud commented Aug 7, 2013

i thought @y-p wrote one

oh you mean non doc in documentation?

@jreback
Copy link
Contributor

jreback commented Aug 7, 2013

yep.....does that find nunique in groupby? (as having no docs)?

@cpcloud
Copy link
Member Author

cpcloud commented Aug 7, 2013

oh sorry his is for undoc'd arguments. not hard to write script to find things with no docstrings, there's ast.get_docstring(ast.parse(arbitrary_python_code)), but checking to see if there are (rst) docs on something like nunique for groupby seems really difficult

@hayd
Copy link
Contributor

hayd commented Aug 7, 2013

Is there a script which checks for docstrings? I was thinking the other day a few which have the @property docstring, would be good to find them all with a "deep" find...

Was talking more about online docs, e.g. just added get_dummies #4444 in recent pr.

@cpcloud
Copy link
Member Author

cpcloud commented Aug 7, 2013

i think to do the deep find you'd need to compile into byte code first

@cpcloud
Copy link
Member Author

cpcloud commented Aug 7, 2013

ast will only parse the raw source which means those run eval'd docstrings wno't show up

@jreback
Copy link
Contributor

jreback commented Apr 23, 2014

hmm....let's close in favor of #6944

@jreback jreback closed this as completed Apr 23, 2014
@cpcloud
Copy link
Member Author

cpcloud commented Apr 23, 2014

cool

@jorisvandenbossche
Copy link
Member

yep, I added a last bullet to mention this specifically.

BTW, @jreback, do you know if this would be easy possible? To add a docstring to the wrapped functions in the apply whitelist?

@jreback
Copy link
Contributor

jreback commented Apr 23, 2014

@jorisvandenbossche

I think you just need to do something like this: https://github.com/pydata/pandas/blob/master/pandas/core/groupby.py#L495
but for __doc__ (and just copy the doc from the function)

@jorisvandenbossche
Copy link
Member

ah yes, thanks. We could maybe eg just add the __doc__ of the original functions but prepend it with one line explaining it acts on each group or something like that.

Will add this to the list in #6944

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants