mirror of
https://github.com/elastic/eland.git
synced 2025-07-11 00:02:14 +08:00
Mirror pandas' to_csv lineterminator instead of line_terminator (#595)
* Mirror pandas' to_csv lineterminator instead of line_terminator (even though it looks a little weird perhaps) * Remove squeeze argument * Revert "Merge branch 'remove-squeeze-argument' into patch-2" This reverts commit 8b9ab5647e244d78ec3471b80ee7c42e019cf347. * Don't remove the parameter yet since people might use it * Add pending deprecation warning --------- Co-authored-by: David Kyle <david.kyle@elastic.co>
This commit is contained in:
parent
28eda95ba9
commit
9b335315bb
@ -1305,6 +1305,7 @@ class DataFrame(NDFrame):
|
|||||||
quoting=None,
|
quoting=None,
|
||||||
quotechar='"',
|
quotechar='"',
|
||||||
line_terminator=None,
|
line_terminator=None,
|
||||||
|
lineterminator=None,
|
||||||
chunksize=None,
|
chunksize=None,
|
||||||
tupleize_cols=None,
|
tupleize_cols=None,
|
||||||
date_format=None,
|
date_format=None,
|
||||||
@ -1319,6 +1320,13 @@ class DataFrame(NDFrame):
|
|||||||
--------
|
--------
|
||||||
:pandas_api_docs:`pandas.DataFrame.to_csv`
|
:pandas_api_docs:`pandas.DataFrame.to_csv`
|
||||||
"""
|
"""
|
||||||
|
if line_terminator:
|
||||||
|
warnings.warn(
|
||||||
|
"The line_terminator argument will be replaced by lineterminator",
|
||||||
|
PendingDeprecationWarning,
|
||||||
|
stacklevel=2,
|
||||||
|
)
|
||||||
|
|
||||||
kwargs = {
|
kwargs = {
|
||||||
"path_or_buf": path_or_buf,
|
"path_or_buf": path_or_buf,
|
||||||
"sep": sep,
|
"sep": sep,
|
||||||
@ -1333,7 +1341,7 @@ class DataFrame(NDFrame):
|
|||||||
"compression": compression,
|
"compression": compression,
|
||||||
"quoting": quoting,
|
"quoting": quoting,
|
||||||
"quotechar": quotechar,
|
"quotechar": quotechar,
|
||||||
"line_terminator": line_terminator,
|
"lineterminator": lineterminator or line_terminator,
|
||||||
"chunksize": chunksize,
|
"chunksize": chunksize,
|
||||||
"date_format": date_format,
|
"date_format": date_format,
|
||||||
"doublequote": doublequote,
|
"doublequote": doublequote,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user