Skip to content

DOC: create folders in to_csv #24306 #42250

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

Merged
merged 7 commits into from
Sep 21, 2021
Merged

Conversation

feefladder
Copy link
Contributor

@feefladder
Copy link
Contributor Author

one question would be if we also want this in to_excel

@mzeitlin11
Copy link
Member

Thanks for the pr @joeperdefloep! Based on the linked issue, it seems like the idea was to add a doc note, and there was no consensus about adding this feature. I'd be surprised by automatic directory creation being the default just based on python behavior, eg

>>> with open("no_dir/text.txt", "x") as handle:
...     handle.write("hello")
...
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
FileNotFoundError: [Errno 2] No such file or directory: 'no_dir/text.txt'

@mzeitlin11 mzeitlin11 added IO CSV read_csv, to_csv Needs Discussion Requires discussion from core team before further action labels Jul 1, 2021
@feefladder
Copy link
Contributor Author

Hi @mzeitlin11 thanks for your comment. I know that it would not eb default Python behaviour. My proposed PR is also only an upate in the docs on how to create a new folder so that users can wrap it in a function. #42255 does indeed implement this behaviour and there is discussion there on whether this should be implemented and/or exposed.

@mzeitlin11
Copy link
Member

Hi @mzeitlin11 thanks for your comment. I know that it would not eb default Python behaviour. My proposed PR is also only an upate in the docs on how to create a new folder so that users can wrap it in a function. #42255 does indeed implement this behaviour and there is discussion there on whether this should be implemented and/or exposed.

My bad @joeperdefloep, commented on the wrong pr :)

@feefladder
Copy link
Contributor Author

yeah, actually also slightly mine, should've said take on the issue

@mzeitlin11 mzeitlin11 removed the Needs Discussion Requires discussion from core team before further action label Jul 2, 2021
@github-actions
Copy link
Contributor

This pull request is stale because it has been open for thirty days with no activity. Please update or respond to this comment if you're still interested in working on this.

@github-actions github-actions bot added the Stale label Aug 12, 2021
Copy link
Member

@alimcmaster1 alimcmaster1 left a 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. Few comments here :)

@alimcmaster1 alimcmaster1 self-assigned this Sep 7, 2021
Copy link
Member

@alimcmaster1 alimcmaster1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few comments and doc build is failing please could you take a look @joeperdefloep

@swt2c
Copy link
Contributor

swt2c commented Sep 15, 2021

Why are you adding an empty file called file.xlsx?

@lithomas1 lithomas1 removed the Stale label Sep 17, 2021
@jreback jreback added this to the 1.4 milestone Sep 17, 2021
@jreback
Copy link
Contributor

jreback commented Sep 17, 2021

thanks @joeperdefloep lgtm.

@alimcmaster1 @lithomas1 if any comments.

@jreback jreback merged commit 411e8ba into pandas-dev:master Sep 21, 2021
@jreback
Copy link
Contributor

jreback commented Sep 21, 2021

thanks @joeperdefloep

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO CSV read_csv, to_csv
Projects
None yet
Development

Successfully merging this pull request may close these issues.

to_csv - allow to create folders.
6 participants