Skip to content

Commit 3f4cd45

Browse files
committed
DOC: Improve what's new
Reference corresponding issues in What's New. Change code example to use string formating for improved modularity.
1 parent 2afe2a1 commit 3f4cd45

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

doc/source/whatsnew/v0.20.0.txt

+14-7
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,22 @@ fixed-width text files, and :func:`read_excel` for parsing Excel files.
4444
pd.read_fwf(StringIO(data)).dtypes
4545
pd.read_fwf(StringIO(data), dtype={'a':'float64', 'b':'object'}).dtypes
4646

47-
Reading dataframes from URLs, in :func:`read_csv` or :func:`read_table`, now
48-
supports additional compression methods (`xz`, `bz2`, `zip`). Previously, only
49-
`gzip` compression was supported. By default, compression of URLs and paths are
50-
now both inferred using their file extensions.
47+
Better support for compressed URLs in ``read_csv``
48+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5149

52-
.. ipython:: python
50+
Compression code was refactored (:issue:`12688`). As a result, reading
51+
dataframes from URLs in :func:`read_csv` or :func:`read_table` now supports
52+
additional compression methods: ``xz``, ``bz2``, and ``zip`` (:issue:`14570`).
53+
Previously, only ``gzip`` compression was supported. By default, compression of
54+
URLs and paths are now both inferred using their file extensions. Additionally,
55+
bz2 support for the python 2 c-engine improved (:issue:`14874`).
5356

54-
url = ('https://github.com/pandas-dev/pandas/raw/master/' +
55-
'pandas/io/tests/parser/data/salaries.csv.bz2')
57+
.. ipython:: python
58+
url = 'https://github.com/{repo}/raw/{branch}/{path}'.format(
59+
repo = 'pandas-dev/pandas',
60+
branch = 'master',
61+
path = 'pandas/io/tests/parser/data/salaries.csv.bz2',
62+
)
5663
df = pd.read_table(url, compression='infer') # default, infer compression
5764
df = pd.read_table(url, compression='bz2') # explicitly specify compression
5865
df.head(2)

0 commit comments

Comments
 (0)