Skip to content

Commit 3716e3c

Browse files
committed
add compression docstring
1 parent 3918196 commit 3716e3c

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
@@ -208,6 +208,14 @@ def get_filepath_or_buffer(filepath_or_buffer, encoding=None,
208208
or buffer
209209
encoding : the encoding to use to decode py3 bytes, default is 'utf-8'
210210
mode : str, optional
211+
compression : {'infer', 'gzip', 'bz2', 'zip', 'xz', None}, default 'infer'
212+
For on-the-fly decompression of on-disk data. If 'infer' and
213+
`filepath_or_buffer` is path-like, then detect compression from the
214+
following extensions: '.gz', '.bz2', '.zip', or '.xz' (otherwise no
215+
decompression). If using 'zip', the ZIP file must contain only one data
216+
file to be read in. Set to None for no decompression.
217+
218+
.. versionadded:: 0.18.1 support for 'zip' and 'xz' compression.
211219
212220
Returns
213221
-------

0 commit comments

Comments
 (0)