Skip to content

Commit ff6b98a

Browse files
committed
DOC: v0.15.1.txt corrections
1 parent 20be789 commit ff6b98a

File tree

1 file changed

+26
-21
lines changed

1 file changed

+26
-21
lines changed

doc/source/whatsnew/v0.15.1.txt

+26-21
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,18 @@ API changes
2323
- ``groupby`` with ``as_index=False`` will not add erroneous extra columns to
2424
result (:issue:`8582`):
2525

26-
.. code-block:: python
26+
.. ipython:: python
2727

28-
In [1]: np.random.seed(2718281)
28+
np.random.seed(2718281)
29+
df = pd.DataFrame(np.random.randint(0, 100, (10, 2)),
30+
columns=['jim', 'joe'])
31+
df.head()
2932

30-
In [2]: df = pd.DataFrame(np.random.randint(0, 100, (10, 2)),
31-
...: columns=['jim', 'joe'])
33+
ts = pd.Series(5 * np.random.randint(0, 3, 10))
34+
35+
previous behavior:
3236

33-
In [3]: ts = pd.Series(5 * np.random.randint(0, 3, 10))
37+
.. code-block:: python
3438

3539
In [4]: df.groupby(ts, as_index=False).max()
3640
Out[4]:
@@ -39,36 +43,38 @@ API changes
3943
1 5 77 84
4044
2 10 96 65
4145

42-
with the new release:
46+
current behavior:
4347

4448
.. ipython:: python
4549

46-
np.random.seed(2718281)
47-
df = pd.DataFrame(np.random.randint(0, 100, (10, 2)),
48-
columns=['jim', 'joe'])
49-
df.head()
50-
51-
ts = pd.Series(5 * np.random.randint(0, 3, 10))
5250
df.groupby(ts, as_index=False).max()
5351

5452
- ``groupby`` will not erroneously exclude columns if the column name conflics
5553
with the grouper name (:issue:`8112`):
5654

57-
.. code-block:: python
55+
.. ipython:: python
5856

59-
In [1]: df = pd.DataFrame({'jim': range(5), 'joe': range(5, 10)})
57+
df = pd.DataFrame({'jim': range(5), 'joe': range(5, 10)})
58+
df
59+
gr = df.groupby(df['jim'] < 2)
6060

61-
In [2]: gr = df.groupby(df['jim'] < 2)
61+
previous behavior (excludes 1st column from output):
6262

63-
In [3]: _ = gr.nth(0) # invokes the code path which excludes the 1st column
63+
.. code-block:: python
6464

65-
In [4]: gr.apply(sum) # excludes 1st column from output
65+
In [4]: gr.apply(sum)
6666
Out[4]:
6767
joe
6868
jim
6969
False 24
7070
True 11
7171

72+
current behavior:
73+
74+
.. ipython:: python
75+
76+
gr.apply(sum)
77+
7278
.. _whatsnew_0151.enhancements:
7379

7480
Enhancements
@@ -80,7 +86,7 @@ Enhancements
8086

8187

8288
- Added support for 3-character ISO and non-standard country codes in :func:``io.wb.download()`` (:issue:`8482`)
83-
- :ref:`World Bank data requests <remote_data.wb>` now will warn/raise based on an ``errors`` argument, as well as a list of hard-coded country codes and the World Bank's JSON response. In prior versions, the error messages didn't look at the World Bank's JSON response. Problem-inducing input were simply dropped prior to the request. The issue was that many good countries were cropped in the hard-coded approach. All countries will work now, but some bad countries will raise exceptions because some edge cases break the entire response.
89+
- :ref:`World Bank data requests <remote_data.wb>` now will warn/raise based on an ``errors`` argument, as well as a list of hard-coded country codes and the World Bank's JSON response. In prior versions, the error messages didn't look at the World Bank's JSON response. Problem-inducing input were simply dropped prior to the request. The issue was that many good countries were cropped in the hard-coded approach. All countries will work now, but some bad countries will raise exceptions because some edge cases break the entire response. (:issue:`8482`)
8490

8591
.. _whatsnew_0151.performance:
8692

@@ -99,7 +105,7 @@ Bug Fixes
99105
~~~~~~~~~
100106

101107

102-
- Bug in coercing ``Categorical` to a records array, e.g. ``df.to_records()`` (:issue:`8626)
108+
- Bug in coercing ``Categorical`` to a records array, e.g. ``df.to_records()`` (:issue:`8626`)
103109
- Bug in ``Categorical`` not created properly with ``Series.to_frame()`` (:issue:`8626`)
104110
- Bug in coercing in astype of a ``Categorical`` of a passed ``pd.Categorical`` (this now raises ``TypeError`` correctly), (:issue:`8626`)
105111
- Bug in ``cut``/``qcut`` when using ``Series`` and ``retbins=True`` (:issue:`8589`)
@@ -141,5 +147,4 @@ Bug Fixes
141147

142148

143149

144-
- Fixed a bug where plotting a column ``y`` and specifying a label
145-
would mutate the index name of the DataFrame ``y`` came from (:issue:`8494`)
150+
- Fixed a bug where plotting a column ``y`` and specifying a label would mutate the index name of the original DataFrame (:issue:`8494`)

0 commit comments

Comments
 (0)