Skip to content

Commit 272c6e7

Browse files
committed
compression parameter descriptions
1 parent 3288691 commit 272c6e7

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

pandas/core/frame.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1655,8 +1655,9 @@ def to_csv(self, path_or_buf=None, sep=",", na_rep='', float_format=None,
16551655
defaults to 'ascii' on Python 2 and 'utf-8' on Python 3.
16561656
compression : string, optional
16571657
a string representing the compression to use in the output file,
1658-
allowed values are 'gzip', 'bz2', 'zip', 'xz',
1659-
only used when the first argument is a filename
1658+
allowed values are 'gzip', 'bz2', 'zip', 'xz', 'zip' only
1659+
supported with Python>=3.0, only used when the first argument is a
1660+
filename.
16601661
line_terminator : string, default ``'\n'``
16611662
The newline character or character sequence to use in the output
16621663
file

pandas/core/generic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1816,7 +1816,8 @@ def to_json(self, path_or_buf=None, orient=None, date_format=None,
18161816
18171817
compression : {None, 'gzip', 'bz2', 'zip', 'xz'}
18181818
A string representing the compression to use in the output file,
1819-
only used when the first argument is a filename
1819+
'zip' only supported with Python>=3.0, only used when the first
1820+
argument is a filename.
18201821
18211822
.. versionadded:: 0.21.0
18221823
@@ -2130,7 +2131,6 @@ def to_pickle(self, path, compression='infer',
21302131
2 2 7
21312132
3 3 8
21322133
4 4 9
2133-
21342134
>>> import os
21352135
>>> os.remove("./dummy.pkl")
21362136
"""

pandas/io/pickle.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ def to_pickle(obj, path, compression='infer', protocol=pkl.HIGHEST_PROTOCOL):
2020
File path where the pickled object will be stored.
2121
compression : {'infer', 'gzip', 'bz2', 'zip', 'xz', None}, default 'infer'
2222
A string representing the compression to use in the output file. By
23-
default, infers from the file extension in specified path.
23+
default, infers from the file extension in specified path. 'zip' only
24+
supported with Python>=3.0
2425
2526
.. versionadded:: 0.20.0
2627
protocol : int
@@ -62,7 +63,6 @@ def to_pickle(obj, path, compression='infer', protocol=pkl.HIGHEST_PROTOCOL):
6263
2 2 7
6364
3 3 8
6465
4 4 9
65-
6666
>>> import os
6767
>>> os.remove("./dummy.pkl")
6868
"""
@@ -133,7 +133,6 @@ def read_pickle(path, compression='infer'):
133133
2 2 7
134134
3 3 8
135135
4 4 9
136-
137136
>>> import os
138137
>>> os.remove("./dummy.pkl")
139138
"""

0 commit comments

Comments
 (0)