Skip to content

docstring templates not being filled #24535

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
jbrockmendel opened this issue Jan 1, 2019 · 2 comments · Fixed by #24584
Closed

docstring templates not being filled #24535

jbrockmendel opened this issue Jan 1, 2019 · 2 comments · Fixed by #24584

Comments

@jbrockmendel
Copy link
Member

>>> print(pd.DatetimeIndex.fillna.__doc__)

Fill NA/NaN values with the specified value

Parameters
----------
value : scalar
    Scalar value to use to fill holes (e.g. 0).
    This value cannot be a list-likes.
downcast : dict, default is None
    a dict of item->dtype of what to downcast if possible,
    or the string 'infer' which will try to downcast to an appropriate
    equal type (e.g. float64 to int64 if possible)

Returns
-------
filled : %(klass)s

I'm pretty sure that the %(klass)s is supposed to be DatetimeIndex.

@gfyoung
Copy link
Member

gfyoung commented Jan 2, 2019

Looks like a missing template parameter in pandas/core/indexes/base.py.

@jbrockmendel : Perhaps it should just be Index ?

print(pd.DatetimeIndex.dropna.__doc__)

Outputs:

Return Index without NA/NaN values

Parameters
----------
how :  {'any', 'all'}, default 'any'
    If the Index is a MultiIndex, drop the value when any or all levels
    are NaN.

Returns
-------
valid : Index

@gfyoung
Copy link
Member

gfyoung commented Jan 3, 2019

cc @jreback

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

Successfully merging a pull request may close this issue.

3 participants