itholic opened a new pull request #33414:
URL: https://github.com/apache/spark/pull/33414
### What changes were proposed in this pull request?
The `DataFrame.to_csv` has `mode` arguments both in pandas and pandas API on
Spark.
However, pandas allows the string "w", "w+", "a", "a+" where as
pandas-on-Spark allows "append", "overwrite", "ignore", "error" or
"errorifexists".
We should map them while `mode` can still accept the existing
parameters("append", "overwrite", "ignore", "error" or "errorifexists") as well.
### Why are the changes needed?
APIs in pandas-on-Spark should follows the behavior of pandas for preventing
the existing pandas code break.
### Does this PR introduce _any_ user-facing change?
`DataFrame.to_csv` now can accept "w", "w+", "a", "a+" as well, same as
pandas.
### How was this patch tested?
Add the unit test and manually write the file with the new acceptable
strings.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]