Skip to content

DOC: Fix indendation in docstring sort_values 'by' parameter #49812

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

Merged
merged 1 commit into from
Nov 25, 2022

Conversation

stijnvanhoey
Copy link
Contributor

@stijnvanhoey stijnvanhoey commented Nov 21, 2022

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

Current version looks like:

Parameters
----------
        by : str or list of str
            Name or list of names to sort by.

            - if `axis` is 0 or `'index'` then `by` may contain index
              levels and/or column labels.
            - if `axis` is 1 or `'columns'` then `by` may contain column
              levels and/or index labels.
axis : {0 or 'index', 1 or 'columns'}, default 0
     Axis to be sorted.

@mroeschke mroeschke added the Docs label Nov 21, 2022
@mroeschke
Copy link
Member

How does this render in the docs?

IMO it looks fine currently? https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.sort_values.html

@stijnvanhoey
Copy link
Contributor Author

stijnvanhoey commented Nov 22, 2022

How does this render in the docs?

Indeed, this look good in the sphinx rendered version. But when I checked the text-version (inside notebook or ipython), it looks like:

image

this PR fixes the latter.

@mroeschke
Copy link
Member

this PR fixes the latter.

Ah okay. Could you double check the sphinx rendered version looks okay too (screenshot of a local rendered doc is fine)?

@stijnvanhoey
Copy link
Contributor Author

Good point, I checked and seems ok
image

@mroeschke mroeschke added this to the 2.0 milestone Nov 25, 2022
@mroeschke mroeschke merged commit 3c72d6f into pandas-dev:main Nov 25, 2022
@mroeschke
Copy link
Member

Thanks @stijnvanhoey

mliu08 pushed a commit to mliu08/pandas that referenced this pull request Nov 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants