Skip to content

DOC: use shared_docs for isna/notna & isnull/notnull #17096

Closed

Description

@jreback

#16972

also some templates so that we can have distinctive doc-strings that use isnull in the doc-string for isnull (rather than isna), same for notnull.

Activity

  1. added this to the 0.21.0 milestone on Jul 27, 2017
  2. yadunathg commented on Aug 14, 2017

    @yadunathg

    Hi @jreback, I am a beginner here and want to work on this issue but am not able to find documentation of how to use shared_docs. Can you provide an example where shared_docs have been used?

  3. gfyoung commented on Aug 15, 2017

    @gfyoung
    Member

    @yadunathg : Awesome that you want to work on this? There is no documentation about how to use this, since it is an internal tool, but you can find an example here:

    _shared_doc_kwargs = dict(

    You can also search for _shared_docs in the GitHub search bar to find further examples in the pandas codebase.

  4. lermana commented on Sep 14, 2017

    @lermana

    I don't know if this is the best place to leave this comment, and apologies if I should put this elsewhere. Wanted to bring attention to the fact that the docs. claim MultiIndex.isnull is implemented despite the fact that MultiIndex.isnull appears to be, for all intents and purposes, not implemented.

  5. gfyoung commented on Sep 14, 2017

    @gfyoung
    Member

    isnull is in fact implementd for MultiIndex (you can check yourself). However, isna is not. I think that should be fixed though @jreback ?

  6. lermana commented on Sep 14, 2017

    @lermana

    @gfyoung thanks for the reply. well yes there is a isnull method for MultiIndex but it calls pandas/core/dtypes/missing._isna_new, which does not appear to be implemented for MultiIndex?

  7. gfyoung commented on Sep 14, 2017

    @gfyoung
    Member

    @lermana : Ah, yes, that's true. Then we should decide whether to implement it (long-term) or just patch the docs immediately. I think we should aim for the former if possible.

  8. lermana commented on Sep 14, 2017

    @lermana

    @gfyoung cool! would def. be a neat feature to have.

    A related question: for both isnull and duplicated DataFrame methods, is there a reason why the docs. don't specify that the functions don't actually look at the DF index / provide a link to the analogous Index functions?

    Happy to submit a PR for the docs. updates if that would be helpful. Just something I was curious about, don't know if it's mentioned elsewhere in the API specification and missed it... this may not be the proper place for this thread.

  9. gfyoung commented on Sep 14, 2017

    @gfyoung
    Member

    Not AFAICT. Go for it then!

  10. lermana commented on Sep 14, 2017

    @lermana

    Cool, will do!

  11. modified the milestones: 0.21.0, on Sep 23, 2017
  12. yihuajack commented on Jul 25, 2022

    @yihuajack

    The consequence of using _shared_docs is that the See also section of the references to isnull and notnull are not informative. For example, the See also section of isnull is

    See Also
    --------
    DataFrame.isnull : Alias of isna.
    DataFrame.notna : Boolean inverse of isna.
    DataFrame.dropna : Omit axes labels with missing values.
    isna : Top-level isna.

    which is exactly the same as the See also section of isna. However, the following seems better:

    See Also
    --------
    DataFrame.isna : Detect missing values.
    DataFrame.notnull : Boolean inverse of isnull.
    DataFrame.dropna : Omit axes labels with missing values.
    isnull : Top-level isnull.

    This issue is also mentioned in #27609.

  13. removed this from the milestone on Oct 13, 2022
  14. coopthompson commented on Jul 25, 2025

    @coopthompson

    take

  15. coopthompson commented on Aug 5, 2025

    @coopthompson

    I would like to be removed as I no longer have the time to complete this task. However; I seem unable to find the method of unassigning myself. Would it be possible for one of the project managers to remove me?

  16. mroeschke commented on Sep 6, 2025

    @mroeschke
    Member

    This is probably OK to keep independent to reduce the complexity of managing and linting the docstrings so closing

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

Metadata

Metadata

Assignees

Labels

DocsMissing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolate

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions