Commit a49b2cd
committed
ENH Move check for inferred compression to before
When reading CSVs, if `compression='infer'`, check the input before calling `get_filepath_or_buffer` in the `_read` function. This way we can catch compresion extensions on S3 files.
We now attempt to infer compression from an input filename only in the `_read` function, instead of separately in each parser.get_filepath_or_buffer
1 parent bf0a15d commit a49b2cd
File tree
5 files changed
+33
-25
lines changed- doc/source/whatsnew
- pandas
- io
- tests
5 files changed
+33
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
481 | 481 | | |
482 | 482 | | |
483 | 483 | | |
| 484 | + | |
| 485 | + | |
484 | 486 | | |
485 | 487 | | |
486 | 488 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
| 220 | + | |
| 221 | + | |
220 | 222 | | |
221 | 223 | | |
222 | 224 | | |
| |||
237 | 239 | | |
238 | 240 | | |
239 | 241 | | |
240 | | - | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
241 | 245 | | |
242 | 246 | | |
243 | 247 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
238 | 253 | | |
239 | 254 | | |
240 | 255 | | |
241 | | - | |
| 256 | + | |
242 | 257 | | |
243 | 258 | | |
244 | 259 | | |
| |||
301 | 316 | | |
302 | 317 | | |
303 | 318 | | |
304 | | - | |
| 319 | + | |
305 | 320 | | |
306 | 321 | | |
307 | 322 | | |
| |||
1402 | 1417 | | |
1403 | 1418 | | |
1404 | 1419 | | |
1405 | | - | |
1406 | | - | |
1407 | | - | |
1408 | | - | |
1409 | | - | |
1410 | | - | |
1411 | | - | |
1412 | | - | |
1413 | | - | |
1414 | | - | |
1415 | | - | |
1416 | 1420 | | |
1417 | 1421 | | |
1418 | 1422 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4341 | 4341 | | |
4342 | 4342 | | |
4343 | 4343 | | |
| 4344 | + | |
| 4345 | + | |
| 4346 | + | |
| 4347 | + | |
| 4348 | + | |
| 4349 | + | |
| 4350 | + | |
| 4351 | + | |
| 4352 | + | |
4344 | 4353 | | |
4345 | 4354 | | |
4346 | 4355 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
541 | 541 | | |
542 | 542 | | |
543 | 543 | | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | 544 | | |
556 | 545 | | |
557 | 546 | | |
| |||
0 commit comments