pandas-dev / pandas

Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more
https://pandas.pydata.org
BSD 3-Clause "New" or "Revised" License
42.62k stars 17.57k forks source link

DOC: Sort the pandas API reference navbar in alphabetical order #59164

Open jeropaul opened 3 days ago

jeropaul commented 3 days ago

Pandas version checks

Location of the documentation

https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.loc.html

Documentation problem

The navigation bar in the API reference documentation is not sorted in alphabetical order!

current navigation example order copied directly from the page.

Dataframe pandas.DataFrame pandas.DataFrame.index pandas.DataFrame.columns pandas.DataFrame.dtypes pandas.DataFrame.info pandas.DataFrame.select_dtypes pandas.DataFrame.values pandas.DataFrame.axes pandas.DataFrame.ndim pandas.DataFrame.size pandas.DataFrame.shape pandas.DataFrame.memory_usage pandas.DataFrame.empty

Why is this a problem?

As a developer starting to work with Python and Pandas When reviewing the Pandas API reference docs Then it is really easy to miss behaviour that I would want to use, because of how it is sorted

Suggested fix for documentation

Sort the documentation alphabetically.

SiddheshBangar commented 2 days ago

@jeropaul Thanks for sharing this issue, I had a look into this, and it is actually a long list to be fixed. If it is required to be fixed let me know, I will open a PR

rhshadrach commented 23 hours ago

The order is in the sections that appear on this page - https://pandas.pydata.org/docs/reference/frame.html. Are we able to order that page independently of the sidebar? If not, I'd be -1 on having a lexicographical ordering across all DataFrame methods.