@@ -3631,18 +3631,16 @@ def to_csv(
3631
3631
False do not print fields for index names. Use index_label=False
3632
3632
for easier importing in R.
3633
3633
mode : {{'w', 'x', 'a'}}, default 'w'
3634
- Python write mode. The available write modes are:
3635
-
3636
- - 'w', opens the file for writing and truncates the file if it
3637
- already exists. If the file does not exist, it creates a new
3638
- file.
3639
- - 'x', opens the file for exclusive creation, meaning it will fail
3640
- if the file already exists. If the file does not exist, it
3641
- creates a new file.
3642
- - 'a', opens the file for writing in append mode. The data is
3643
- written to the end of the file, without truncating it. If the
3644
- file does not exist, it creates a new file.
3634
+ Forwarded to either `open(mode=)` or `fsspec.open(mode=)` to control
3635
+ the file opening. Typical values include:
3645
3636
3637
+ - 'w', open for writing, truncating the file first.
3638
+ - 'x', open for exclusive creation, failing if the file already exists.
3639
+ - 'a', open for writing, appending to the end of file if it exists.
3640
+
3641
+ Including 'b' or 't' in the mode parameter will inform Pandas whether
3642
+ 'path_or_buf' requires string or binary data. However, in most cases,
3643
+ this should not be necessary.
3646
3644
encoding : str, optional
3647
3645
A string representing the encoding to use in the output file,
3648
3646
defaults to 'utf-8'. `encoding` is not supported if `path_or_buf`
0 commit comments