question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DOC: unused Series axis parameter arbitrarily defaults to 0 or None

See original GitHub issue

Pandas 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:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
phoflcommented, May 27, 2022

I would prefer keeping the defaults in line with the DataFrame methods

0reactions
jackgoldsmith4commented, May 27, 2022

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found