Skip to content

DOC: convert_dtypes incorrectly assumes the output is a always DataFrame #58546

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
Aloqeely opened this issue May 3, 2024 · 0 comments · Fixed by #58558
Closed
1 task done

DOC: convert_dtypes incorrectly assumes the output is a always DataFrame #58546

Aloqeely opened this issue May 3, 2024 · 0 comments · Fixed by #58558
Labels
Docs Needs Triage Issue that has not been reviewed by a pandas team member

Comments

@Aloqeely
Copy link
Member

Aloqeely commented May 3, 2024

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/reference/api/pandas.Series.convert_dtypes.html

Documentation problem

The dtype_backend parameter says: "Back-end data type applied to the resultant DataFrame" but Series.convert_dtypes returns a Series not a DataFrame

On a sidenote, there are a few more methods in NDFrame that assume the method will be used on a DataFrame only

Suggested fix for documentation

"resultant DataFrame or Series"
It would be even better to get rid of the unnecessary "DataFrame or Series" and have some way to know whether this doc is displayed for DataFrame.convert_dtypes or Series.convert_dtypes

@Aloqeely Aloqeely added Docs Needs Triage Issue that has not been reviewed by a pandas team member labels May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs Needs Triage Issue that has not been reviewed by a pandas team member
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant