Missing source link
- [ ] closes #58351
The source link located at the upper right-hand side of DataFrame.index and DataFrame.columns is still missing. This may be because they do not have any code.
DataFrame.index and DataFrame.columns are properties.AxisProperty
I still merged the two Axes sections in the .rst file after discussing with @WillAyd
The same thing exists for Series.index
/preview
/preview
Website preview of this PR available at: https://pandas.pydata.org/preview/pandas-dev/pandas/59549/
From the preview link I don't think this did anything:
https://pandas.pydata.org/preview/pandas-dev/pandas/59549/docs/reference/api/pandas.DataFrame.index.html
May also just be because these items are class attributes and not properties.
I'm not entirely sure how the docs generate the source link - @mroeschke do you know what tool does that and/or how it works?
They are generated via Sphinx through this extension I presume, but I've never played around with it https://www.sphinx-doc.org/en/master/usage/extensions/linkcode.html#confval-linkcode_resolve
From the preview link I don't think this did anything:
https://pandas.pydata.org/preview/pandas-dev/pandas/59549/docs/reference/api/pandas.DataFrame.index.html
May also just be because these items are class attributes and not properties.
I'm not entirely sure how the docs generate the
sourcelink - @mroeschke do you know what tool does that and/or how it works?
This only added a "See also" section for pandas.DataFrame.columns.
@WillAyd @mroeschke Ideally, do we want the source link to point to this or as Will said as DataFrame.columns has no code, there is no need to have a source link?
There ideally should be a source link to your reference, but there might be some extra Sphinx code needed to find that reference
It seems that Sphinx does not support .pyi files (see here and here and also here)
pandas.DataFrame.columns is a pandas._libs.properties.AxisProperty located here
The same thing exists for pandas.Interval for which the source link is missing as well. It is defined here
Should we close this issue then?
Nonetheless, I slightly updated the pandas.DataFrame.columns doc (added a Return and See also section)
Thanks @fbourgey