Skip to content
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

DOC: User guide still recommends delim_whitespace #58488

Closed
1 task done
edbennett opened this issue Apr 30, 2024 · 3 comments · Fixed by #58659
Closed
1 task done

DOC: User guide still recommends delim_whitespace #58488

edbennett opened this issue Apr 30, 2024 · 3 comments · Fixed by #58659
Labels
Docs Needs Triage Issue that has not been reviewed by a pandas team member

Comments

@edbennett
Copy link

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/user_guide/io.html#basic

Documentation problem

While the main API reference indicates that the delim_whitespace option to pandas.read_csv is deprecated, the User Guide still lists it as an option with no caveat. This may lead new users to adopt an option that is already deprecated, and either immediately get warnings, or write code that will break relatively soon.

Suggested fix for documentation

Either remove the delim_whitespace option from the page (probably preferred; new users don't need to be introduced to features about to be deprecated) or add a deprecation notice similar to the one appearing on the read_csv reference

@edbennett edbennett added Docs Needs Triage Issue that has not been reviewed by a pandas team member labels Apr 30, 2024
@Aloqeely
Copy link
Member

Aloqeely commented Apr 30, 2024

I agree with your suggested fix, but this option's deprecation will be enforced so it will be removed from the docs in the next release anyway.

@rhshadrach
Copy link
Member

Thanks for the report! It looks like there was an attempt to add a deprecation notice, but it does not come through in the docs (reST can be tricky):

.. deprecated: 2.2.0
Use ``sep="\\s+" instead.

this option's deprecation will be enforced so it will be removed from the docs in the next release anyway.

Agreed that it should be, but with the way it's hard coded in the User Guide, nothing will fail if it accidentally gets left behind. Also, in good generality I think the User Guide should represent how we want users to use pandas, so I think it makes sense to remove it now, ahead of its deprecation.

What do you think?

@Aloqeely
Copy link
Member

Aloqeely commented May 1, 2024

You're right. I agree on removing it

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.

3 participants