Skip to content

DOC: Change "Convention for examples" to use Series name as ser instead of s #53271

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

Closed
1 task done
DeaMariaLeon opened this issue May 17, 2023 · 7 comments · Fixed by #53312
Closed
1 task done

DOC: Change "Convention for examples" to use Series name as ser instead of s #53271

DeaMariaLeon opened this issue May 17, 2023 · 7 comments · Fixed by #53312

Comments

@DeaMariaLeon
Copy link
Member

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/dev/development/contributing_docstring.html#conventions-for-the-examples

Documentation problem

There's a general preference to use ser = instead of s = in examples

Per @MarcoGorelli

Suggested fix for documentation

Change s to ser on paragraph:

"When illustrating examples with a single Series use the name s, and if illustrating with a single DataFrame use the name df. For indices, idx is the preferred name. If a set of homogeneous Series or DataFrame is used, name them s1, s2, s3"

@MarcoGorelli
Copy link
Member

thanks - yeah I've seen people request non-single-letter-variables in reviews, but the docstring guide still advises to use them - looks like the preference changed but nobody codified it. Would be good to change it

@topper-123
Copy link
Contributor

+1

@austinburnett
Copy link
Contributor

Hello! I'd be happy to work on this issue.

@DeaMariaLeon
Copy link
Member Author

Hi @austinburnett ! Great, please go ahead.

@austinburnett
Copy link
Contributor

austinburnett commented May 19, 2023

Hey @DeaMariaLeon @MarcoGorelli I believed I finished up the issue! #53312

@shreevaths1
Copy link

First time contribution to open source. Please guide me as to what is the first step I can take

@DeaMariaLeon
Copy link
Member Author

@austinburnett we commented there, thanks.

@shreevaths1 : This issue is taken. But you can take a look at https://pandas.pydata.org/docs/development/contributing.html#where-to-start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants