You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DOC: use shared_docs for isna/notna & isnull/notnull #17096
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?
@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:
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.isnullis implemented despite the fact that MultiIndex.isnull appears to be, for all intents and purposes, not implemented.
@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?
@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.
@gfyoung cool! would def. be a neat feature to have.
A related question: for both isnull and duplicatedDataFrame 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.
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
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?
Activity
yadunathg commentedon Aug 14, 2017
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?
gfyoung commentedon Aug 15, 2017
@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:
pandas/pandas/core/series.py
Line 82 in 7bef6d8
You can also search for
_shared_docsin the GitHub search bar to find further examples in thepandascodebase.lermana commentedon Sep 14, 2017
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.isnullis implemented despite the fact thatMultiIndex.isnullappears to be, for all intents and purposes, not implemented.gfyoung commentedon Sep 14, 2017
isnullis in fact implementd forMultiIndex(you can check yourself). However,isnais not. I think that should be fixed though @jreback ?lermana commentedon Sep 14, 2017
@gfyoung thanks for the reply. well yes there is a
isnullmethod forMultiIndexbut it callspandas/core/dtypes/missing._isna_new, which does not appear to be implemented forMultiIndex?gfyoung commentedon Sep 14, 2017
@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.
lermana commentedon Sep 14, 2017
@gfyoung cool! would def. be a neat feature to have.
A related question: for both
isnullandduplicatedDataFramemethods, 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 analogousIndexfunctions?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.
gfyoung commentedon Sep 14, 2017
Not AFAICT. Go for it then!
lermana commentedon Sep 14, 2017
Cool, will do!
yihuajack commentedon Jul 25, 2022
The consequence of using _shared_docs is that the See also section of the references to
isnullandnotnullare not informative. For example, the See also section ofisnulliswhich is exactly the same as the See also section of
isna. However, the following seems better:This issue is also mentioned in #27609.
coopthompson commentedon Jul 25, 2025
take
coopthompson commentedon Aug 5, 2025
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?
mroeschke commentedon Sep 6, 2025
This is probably OK to keep independent to reduce the complexity of managing and linting the docstrings so closing