File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -247,23 +247,26 @@ def file_path_to_url(path):
247
247
248
248
def _infer_compression (filepath_or_buffer , compression ):
249
249
"""
250
- Get file handle for given path/buffer and mode.
250
+ Get the compression method for filepath_or_buffer. If compression='infer',
251
+ the inferred compression method is returned. Otherwise, the input
252
+ compression method is returned unchanged, unless it's invalid, in which case
253
+ an error is raised.
251
254
252
255
Parameters
253
256
----------
254
257
filepath_or_buf :
255
258
a path (str) or buffer
256
- compression : str, or None
259
+ compression : str or None
260
+ the compression method including None for no compression and 'infer'
257
261
258
262
Returns
259
263
-------
260
- string compression method, None
264
+ string or None :
265
+ compression method
261
266
262
267
Raises
263
268
------
264
269
ValueError on invalid compression specified
265
-
266
- If compression='infer', infer compression. If compression
267
270
"""
268
271
269
272
# No compression has been explicitly specified
You can’t perform that action at this time.
0 commit comments