Skip to content

DOC: Improve describe() doc in getting started #40972

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
NicoLoco opened this issue Apr 16, 2021 · 2 comments · Fixed by #41012
Closed

DOC: Improve describe() doc in getting started #40972

NicoLoco opened this issue Apr 16, 2021 · 2 comments · Fixed by #41012
Assignees
Milestone

Comments

@NicoLoco
Copy link

In the "getting started tutorial" here: https://pandas.pydata.org/docs/getting_started/intro_tutorials/01_table_oriented.html

The following sentence is incorrect
Many pandas operations return a DataFrame or a Series. The describe() method is an example of a pandas operation returning a pandas Series.

It should say "The describe() method is an example of a pandas operation returning a pandas DataFrame"

Steps to reproduce

import pandas as pd
df = pd.DataFrame({
... "Name" : ["Ally", "Bob", "Charly"],
... "Age" : [15,25,36],
... "Cash": [1000,5000, 20000]});
d = df.describe()
type(d)
<class 'pandas.core.frame.DataFrame'>

@NicoLoco NicoLoco added Docs Needs Triage Issue that has not been reviewed by a pandas team member labels Apr 16, 2021
@mzeitlin11
Copy link
Member

Thanks for the report @NicoLoco! Could you please edit your issue title to reflect the content?

Agreed that this is wrong, though it's not quite so clear because describe can return a Series if applied to a Series. Clarification would certainly be helpful here since in the example usage the result is a DataFrame, not a Series.

@mzeitlin11 mzeitlin11 added good first issue and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Apr 16, 2021
@phofl phofl changed the title DOC: DOC: Improve describe() doc in getting started Apr 16, 2021
@bharatr21
Copy link
Contributor

take

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

Successfully merging a pull request may close this issue.

4 participants