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
Fix ValueError when running to_csv in append mode with single_file as True #10441
Conversation
Can one of the admins verify this patch? Admins can comment |
add to allowlist |
Co-authored-by: Hendrik Makait <hendrik@makait.com>
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.
The code looks good to me. I have some additional recommendations for improving the test.
Co-authored-by: Hendrik Makait <hendrik@makait.com>
Co-authored-by: Hendrik Makait <hendrik@makait.com>
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.
The updated test looks great. Thanks for your contribution, @benrutter!
I've committed two minor nit-picks and will merge once CI is done. |
I think the failing test here isn't related to this PR? (it's from dask/dataframe/io/tests/test_parquet.py) |
pre-commit run --all-files
I think this is pretty well described here: #10414
Currently dask adds on "a" to the mode when single_file is True, but this clashes when the mode is already set to "a".
This PR adds in a conditional check the the mode ending with "a" before appending "a" to the end.
Also, testing added to cover the bug fix.