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: read_fwf claims to support a [str] in the first argument #55790

Open
1 task done
koubaa opened this issue Nov 1, 2023 · 1 comment
Open
1 task done

DOC: read_fwf claims to support a [str] in the first argument #55790

koubaa opened this issue Nov 1, 2023 · 1 comment
Labels
Docs Needs Triage Issue that has not been reviewed by a pandas team member

Comments

@koubaa
Copy link

koubaa commented Nov 1, 2023

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/pandas-docs/version/2.0/reference/api/pandas.read_fwf.html

Documentation problem

read_fwf does not support a string type in the filepath_or_buffer argument.

Parameters:
filepath_or_buffer : str, path object, or file-like object
String, path object (implementing os.PathLike[str]), or file-like object implementing a text read() function.The string could be a URL. Valid URL schemes include http, ftp, s3, and file. For file URLs, a host is expected. A local file could be: file://localhost/path/to/table.csv.

Suggested fix for documentation

remove str/string from this parameter documentation

@koubaa koubaa added Docs Needs Triage Issue that has not been reviewed by a pandas team member labels Nov 1, 2023
@twoertwein
Copy link
Member

Are you saying that it doesn't support something like "/path/to/file" or it doesn't support something like "a,b,c\n1,2,3" (string containing the content). The first one (str containing a path) should work? The second one is not intended to work.

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

No branches or pull requests

2 participants