Document S3 and GCS path functionality of DataFrame.to_csv()
- [x] closes #8508 

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()`
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 <notifications@github.com> wrote:

> @WillAyd commented on this pull request.
>
> Thanks for the PR. Question on my end
>
> ---------------------------------------------------------------
>
> In [pandas/core/generic.py](https://github.com/pandas-dev/pandas/pull/29920#discussion_r352211962):
>
>> @@ -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](https://github.com/pandas-dev/pandas/pull/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 