Skip to content

Commit 09dcbff

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. Add what's new id
1 parent c4ea3d3 commit 09dcbff

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

doc/source/whatsnew/v0.20.0.txt

+16-7
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,24 @@ Strings passed to ``DataFrame.groupby()`` as the ``by`` parameter may now refere
6464

6565
df.groupby(['second', 'A']).sum()
6666

67-
Reading dataframes from URLs, in :func:`read_csv` or :func:`read_table`, now
68-
supports additional compression methods (`xz`, `bz2`, `zip`). Previously, only
69-
`gzip` compression was supported. By default, compression of URLs and paths are
70-
now both inferred using their file extensions.
67+
.. _whatsnew_0200.enhancements.compressed_urls:
7168

72-
.. ipython:: python
69+
Better support for compressed URLs in ``read_csv``
70+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
71+
72+
Compression code was refactored (:issue:`12688`). As a result, reading
73+
dataframes from URLs in :func:`read_csv` or :func:`read_table` now supports
74+
additional compression methods: ``xz``, ``bz2``, and ``zip`` (:issue:`14570`).
75+
Previously, only ``gzip`` compression was supported. By default, compression of
76+
URLs and paths are now both inferred using their file extensions. Additionally,
77+
bz2 support for the python 2 c-engine improved (:issue:`14874`).
7378

74-
url = ('https://github.com/pandas-dev/pandas/raw/master/' +
75-
'pandas/io/tests/parser/data/salaries.csv.bz2')
79+
.. ipython:: python
80+
url = 'https://github.com/{repo}/raw/{branch}/{path}'.format(
81+
repo = 'pandas-dev/pandas',
82+
branch = 'master',
83+
path = 'pandas/io/tests/parser/data/salaries.csv.bz2',
84+
)
7685
df = pd.read_table(url, compression='infer') # default, infer compression
7786
df = pd.read_table(url, compression='bz2') # explicitly specify compression
7887
df.head(2)

0 commit comments

Comments
 (0)