-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
Document S3 and GCS path functionality of DataFrame.to_csv() #29920
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. Question on my end
pandas/core/generic.py
Outdated
`newline=''`, disabling universal newlines. | ||
path_or_buf : str, path object, file-like object, default None | ||
If a string is passed, it can be an existing local file path, as | ||
well as a gcs:// or s3:// path. If a file object is passed it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I might be a little too strict, but I'm generally against documenting requirements of third party dependencies - would these not generally fall under the umbrella of being "file-like" to begin with?
I agree this is actually implied. I also think that’s not helpful enough for a decent portion of pandas users who may find this useful.
I considered adding it to the user guide. But my impression is that the guidance there usually is a bit more complete.
I could always write it as an answer to a StackOverflow question and hope search indexes will help me.
Sent from ProtonMail Mobile
…On Fri, Nov 29, 2019 at 18:24, William Ayd ***@***.***> wrote:
@WillAyd commented on this pull request.
Thanks for the PR. Question on my end
---------------------------------------------------------------
In [pandas/core/generic.py](#29920 (comment)):
> @@ -3128,10 +3128,12 @@ def to_csv(
Parameters
----------
- path_or_buf : str or file handle, default None
- File path or object, if None is provided the result is returned as
- a string. If a file object is passed it should be opened with
- `newline=''`, disabling universal newlines.
+ path_or_buf : str, path object, file-like object, default None
+ If a string is passed, it can be an existing local file path, as
+ well as a gcs:// or s3:// path. If a file object is passed it
So I might be a little too strict, but I'm generally against documenting requirements of third party dependencies - would these not generally fall under the umbrella of being "file-like" to begin with?
—
You are receiving this because you authored the thread.
Reply to this email directly, [view it on GitHub](#29920?email_source=notifications&email_token=AB3PSJPXTOLLDDHBLSOS47DQWFF6HA5CNFSM4JSYJQ3KYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCNOEL4Y#pullrequestreview-324814323), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AB3PSJMBMGJ2SIJWNAVB6EDQWFF6HANCNFSM4JSYJQ3A).
|
Yea let’s do that. So I think you can revert the changes to pandas/core/generic, but can keep the typo fix in the IO guide and we can merge |
Great thanks @oguzhanogreden |
I made more changes than absolutely necessary for documenting this. It's a bit more complete and it reads a more similar to
pd.read_csv()