-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TYP: FrameOrSeriesUnion #36475
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
at the moment, sphinx expands the aliases rather than showing the alias. see return type of https://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.concat.html |
#29480 sort of related as well. |
Thanks for the background @simonjayhawkins. I see a different result here: https://pandas.pydata.org/docs/reference/api/pandas.concat.html where the type-hints are not expanded. Is this a recent change that will impact the 1.2 docs when released? |
tbh, not even sure why they are appearing for pd.concat in html docs as they as supposed to be disabled, see #33312 for normal python help...
it even includes the ForwardRef! (this can now be removed, but not for backports, see #36034) |
@simonjayhawkins This is an issue with Sphinx, currently open: |
type annotations are no longer displayed in the docs
no longer relevant. #41955 |
From the discussion in PR #36409 it was mentioned that it is undesirable to type API functions as
NDFrame
as this may be confusing from a user perspective since it shows up in the docs. Currently the difference betweenNDFrame
andFrameOrSeriesUnion = Union[DataFrame, Series]
is that the former can be used in methods of NDFrame (and those called from NDFrame methods) whereas the latter cannot.Is there a benefit to this restriction? If not, I propose changing
FrameOrSeriesUnion
to be an alias ofNDFrame
. This would then be user-friendly for the docs.cc @simonjayhawkins @WillAyd @jreback
The text was updated successfully, but these errors were encountered: