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
43.84k stars 18k forks source link

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

Open jeropaul opened 4 months ago

jeropaul commented 4 months 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 4 months 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 4 months 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.

jeropaul commented 4 months ago

I also note that pandas.DataFrame.tail is listed in the navigation bar twice for the DataFrame... I suspect that this happens because it appears in both 'Reindexing / selection / label manipulation' and 'Indexing, iteration'. Not a significant issue but it is kinda weird.

Being honest I did not even notice the right hand side menu bar until @rhshadrach pointed it out...

sooooooing commented 1 week ago

take