Skip to content

Commit d4ed3b0

Browse files
Move new errors argument to the end
1 parent 8e04bd0 commit d4ed3b0

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

pandas/core/generic.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -3028,7 +3028,6 @@ def to_csv(
30283028
index_label: Optional[Union[bool_t, str, Sequence[Label]]] = None,
30293029
mode: str = "w",
30303030
encoding: Optional[str] = None,
3031-
errors: str = "strict",
30323031
compression: Optional[Union[str, Mapping[str, str]]] = "infer",
30333032
quoting: Optional[int] = None,
30343033
quotechar: str = '"',
@@ -3038,6 +3037,7 @@ def to_csv(
30383037
doublequote: bool_t = True,
30393038
escapechar: Optional[str] = None,
30403039
decimal: Optional[str] = ".",
3040+
errors: str = "strict",
30413041
) -> Optional[str]:
30423042
r"""
30433043
Write object to a comma-separated values (csv) file.
@@ -3085,12 +3085,6 @@ def to_csv(
30853085
encoding : str, optional
30863086
A string representing the encoding to use in the output file,
30873087
defaults to 'utf-8'.
3088-
errors : str, default 'strict'
3089-
Specifies how encoding and decoding errors are to be handled.
3090-
See the errors argument for :func:`open` for a full list
3091-
of options.
3092-
3093-
.. versionadded:: 1.1.0
30943088
compression : str or dict, default 'infer'
30953089
If str, represents compression mode. If dict, value at 'method' is
30963090
the compression mode. Compression mode may be any of the following
@@ -3131,6 +3125,12 @@ def to_csv(
31313125
decimal : str, default '.'
31323126
Character recognized as decimal separator. E.g. use ',' for
31333127
European data.
3128+
errors : str, default 'strict'
3129+
Specifies how encoding and decoding errors are to be handled.
3130+
See the errors argument for :func:`open` for a full list
3131+
of options.
3132+
3133+
.. versionadded:: 1.1.0
31343134
31353135
Returns
31363136
-------

pandas/io/common.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -330,10 +330,10 @@ def get_handle(
330330
path_or_buf,
331331
mode: str,
332332
encoding=None,
333-
errors=None,
334333
compression: Optional[Union[str, Mapping[str, Any]]] = None,
335334
memory_map: bool = False,
336335
is_text: bool = True,
336+
errors=None,
337337
):
338338
"""
339339
Get file handle for given path/buffer and mode.
@@ -346,12 +346,6 @@ def get_handle(
346346
Mode to open path_or_buf with.
347347
encoding : str or None
348348
Encoding to use.
349-
errors : str, default 'strict'
350-
Specifies how encoding and decoding errors are to be handled.
351-
See the errors argument for :func:`open` for a full list
352-
of options.
353-
354-
.. versionadded:: 1.1.0
355349
compression : str or dict, default None
356350
If string, specifies compression mode. If dict, value at key 'method'
357351
specifies compression mode. Compression mode must be one of {'infer',
@@ -372,6 +366,12 @@ def get_handle(
372366
is_text : boolean, default True
373367
whether file/buffer is in text format (csv, json, etc.), or in binary
374368
mode (pickle, etc.).
369+
errors : str, default 'strict'
370+
Specifies how encoding and decoding errors are to be handled.
371+
See the errors argument for :func:`open` for a full list
372+
of options.
373+
374+
.. versionadded:: 1.1.0
375375
376376
Returns
377377
-------

0 commit comments

Comments
 (0)