-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CLN: Incorrect name in docstrings for generic #4717
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
Comments
prob need wrapper methods (like arith methods), for methods that are now generic eg reindex,fillna,replace,rename |
or first solution is good too |
That's what I was thinking too...I like the second solution better...it's a bit more complicated, but nicer for the end-user / online docs... |
@jreback for some of these, might it make sense to have a front-end around the method that just calls super (which means you'll be able to see the actual type signature for tab completions like in IPython notebook, etc.). btw - did you mean to change the signature for Anyways, this is what I was thinking: #DataFrame.rename
def rename(self, index=None, columns=None, copy=True, inplace=False):
"""
Alter index and / or columns using input function or
functions. Function / dict values must be unique (1-to-1). Labels not
contained in a dict / Series will be left as-is.
Parameters
----------
index : dict-like or function, optional
Transformation to apply to index values
columns : dict-like or function, optional
Transformation to apply to column values
copy : boolean, default True
Also copy underlying data
inplace : boolean, default False
Whether to return a new DataFrame. If True then value of copy is
ignored.
See also
--------
Series.rename
Returns
-------
renamed : DataFrame (new object)
"""
return super(self, DataFrame).rename(index=index, columns=columns, copy=copy, inplace=inplace) And that way, if you're playing with pandas in IPython Notebook, it will complete |
Non-exhaustive, but at least some of the public functions that have shifted from v0.11 to v0.13. Not necessary (because no docstrings or don't vary by kind, etc.):
|
I did change series.rename on purpose as it was inconsistent (and also didn't function properly on multi indices) |
@jreback got it. and obviously not all of those funcs ought to have special names...definitely some of them though. |
I don't think h really need to boilerplate as self.class is always correct ; not sure how to get ipython to correctly deal with it though I agree would be nice to have 'filled' in argument methods - but would require maybe generating these functions |
actually the above example is prob not too hard to automatically generate (all of the properties are their to do it, eg class._AXIS_ORDERS) - see top of generic |
actually yeah that's true. |
The problem is you can't copy the function - but I guess they're already |
I punted on some of these and put a PandasObject as the return type (so maybe should be better) |
@jreback - why doesn't filter document the |
because I added it in the refactor (filter was only defined for frame I think, but made sense for panel); not sure if it is relevant for series though needs docs (and prob some tests), kind of got 'lost' |
@jreback I went through and sorted some things. I think it's really just |
@jtratner let's convert the remainder to 0.14? |
Yeah, I think the majority are actually already done (or I realized they |
ok.....i'll leave u to it then |
@jtratner going to change to 0.14..but close if you can |
good enough for now...will keep things like this in mind for the future. |
E.g. for reindex on panel
Functions that need parameters list/explanation:
Functions that only need list of axes:
Functions needing a little work:
SparsePanel
does)Functions that may not need to be changed:
Functions that could use slight wording tweaks:
The text was updated successfully, but these errors were encountered: