Skip to content

Commit f2c9540

Browse files
committed
add compression docstring
1 parent 153c58c commit f2c9540

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pandas/io/common.py

+8
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,14 @@ def get_filepath_or_buffer(filepath_or_buffer, encoding=None,
215215
or buffer
216216
encoding : the encoding to use to decode py3 bytes, default is 'utf-8'
217217
mode : str, optional
218+
compression : {'infer', 'gzip', 'bz2', 'zip', 'xz', None}, default 'infer'
219+
For on-the-fly decompression of on-disk data. If 'infer' and
220+
`filepath_or_buffer` is path-like, then detect compression from the
221+
following extensions: '.gz', '.bz2', '.zip', or '.xz' (otherwise no
222+
decompression). If using 'zip', the ZIP file must contain only one data
223+
file to be read in. Set to None for no decompression.
224+
225+
.. versionadded:: 0.18.1 support for 'zip' and 'xz' compression.
218226
219227
Returns
220228
-------

0 commit comments

Comments
 (0)