DOC: unused Series axis parameter arbitrarily defaults to 0 or None
See original GitHub issuePandas version checks
- I have checked that the issue still exists on the latest versions of the docs on
main
here
Location of the documentation
https://pandas.pydata.org/docs/reference/api/pandas.Series.add.html - example of defaulting to 0 https://pandas.pydata.org/docs/reference/api/pandas.Series.argmin.html - example of defaulting to None
Documentation problem
As a new user and contributor the Series axis parameter has been confusing to me. I now know it is not used for Series and only exists for compatibility with DataFrame. However, it is also confusing that it seems to arbitrarily default to either 0 or None
. Does this difference matter for different methods?
Suggested fix for documentation
Unless there is a reason why different methods have default axis
as 0 or None
, I propose changing all Series method axis
parameters to default to either 0 or None
. This will make the parameter and the docs more clear.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
What's new in 1.5.0 (September 19, 2022) - Pandas
With Pyarrow installed, users can now create pandas objects that are backed by a pyarrow.ChunkedArray and pyarrow.DataType . The dtype argument can accept...
Read more >Column chart options | Looker - Google Cloud
Default: Series values are ordered according to their position in the data table. ... This parameter accepts values between 0 and 1. Enter...
Read more >XML Reference - MuJoCo documentation
This mechanism enables the compiler to determine if the attribute has been “touched” by the user, either explicitly or through defaults, and take...
Read more >API Changes — Matplotlib 3.3.4 documentation
locator_params used to accept any value for axis and silently did nothing, when passed an unsupported value. It now raises a ValueError ....
Read more >yt.frontends.exodus_ii.data_structures module — The yt Project 4.1 ...
YTFieldNotParsable – If fields are not parsable to yt field keys. ... by default, but can be cast to arbitrary units using the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I would prefer keeping the defaults in line with the DataFrame methods
Closing because the Series axis parameter won’t change. I now understand it is 0 or None solely based on the corresponding DataFrame method. I may open another issue or question about argmin and argmax more generally