Skip to content

Commit b395065

Browse files
committed
DOC: Closes Issue pandas-dev#24240 Fix Flake8 issues /doc/source/whatsnew/v0.14.*
Implemented changes based on feedback.
1 parent f940cd8 commit b395065

File tree

2 files changed

+32
-39
lines changed

2 files changed

+32
-39
lines changed

doc/source/whatsnew/v0.14.0.rst

+32-36
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ v0.14.0 (May 31 , 2014)
88
.. ipython:: python
99
:suppress:
1010
11-
import pandas as pd
1211
1312
This is a major release from 0.13.1 and includes a small number of API changes, several new features,
1413
enhancements, and performance improvements along with a large number of bug fixes. We recommend that all
@@ -73,12 +72,11 @@ API changes
7372

7473
.. code-block:: python
7574
76-
dfl.iloc[[4, 5, 6]]
77-
IndexError: positional indexers are out-of-bounds
75+
>>> dfl.iloc[[4, 5, 6]]
76+
IndexError: positional indexers are out-of-bounds
7877
79-
.. code-block:: python
80-
dfl.iloc[:, 4]
81-
IndexError: single positional indexer is out-of-bounds
78+
>>> dfl.iloc[:, 4]
79+
IndexError: single positional indexer is out-of-bounds
8280
8381
- Slicing with negative start, stop & step values handles corner cases better (:issue:`6531`):
8482

@@ -218,12 +216,12 @@ API changes
218216

219217
.. code-block:: python
220218
221-
x = pd.Series(np.random.rand(10) > 0.5)
222-
y = True
223-
x + y # warning generated: should do x | y instead
224-
x / y # this raises because it doesn't make sense
219+
>>> x = pd.Series(np.random.rand(10) > 0.5)
220+
>>> y = True
221+
>>> x + y # warning generated: should do x | y instead
222+
>>> x / y # this raises because it doesn't make sense
225223
226-
NotImplementedError: operator '/' not implemented for bool dtypes
224+
NotImplementedError: operator '/' not implemented for bool dtypes
227225
228226
- In ``HDFStore``, ``select_as_multiple`` will always raise a ``KeyError``, when a key or the selector is not found (:issue:`6177`)
229227
- ``df['col'] = value`` and ``df.loc[:,'col'] = value`` are now completely equivalent;
@@ -504,13 +502,13 @@ See also issues (:issue:`6134`, :issue:`4036`, :issue:`3057`, :issue:`2598`, :is
504502

505503
.. code-block:: python
506504
507-
df.loc[(slice('A1', 'A3'), .....), :]
505+
>>> df.loc[(slice('A1', 'A3'), ...), :] # noqa: E901
508506
509507
rather than this:
510508
511509
.. code-block:: python
512510
513-
df.loc[(slice('A1', 'A3'), .....)]
511+
>>> df.loc[(slice('A1', 'A3'), ...)] # noqa: E901
514512
515513
.. warning::
516514

@@ -769,32 +767,30 @@ Enhancements
769767

770768
.. ipython:: python
771769
772-
household = pd.DataFrame({
773-
'household_id': [1, 2, 3],
774-
'male': [0, 1, 0],
775-
'wealth': [196087.3, 316478.7, 294750]
776-
},
770+
household = pd.DataFrame({'household_id': [1, 2, 3],
771+
'male': [0, 1, 0],
772+
'wealth': [196087.3, 316478.7, 294750]
773+
},
777774
columns=['household_id', 'male', 'wealth']
778775
).set_index('household_id')
779776
household
780-
portfolio = pd.DataFrame({
781-
'household_id': [1, 2, 2, 3, 3, 3, 4],
782-
'asset_id': ["nl0000301109",
783-
"nl0000289783",
784-
"gb00b03mlx29",
785-
"gb00b03mlx29",
786-
"lu0197800237",
787-
"nl0000289965",
788-
np.nan],
789-
'name': ["ABN Amro",
790-
"Robeco",
791-
"Royal Dutch Shell",
792-
"Royal Dutch Shell",
793-
"AAB Eastern Europe Equity Fund",
794-
"Postbank BioTech Fonds",
795-
np.nan],
796-
'share': [1.0, 0.4, 0.6, 0.15, 0.6, 0.25, 1.0]
797-
},
777+
portfolio = pd.DataFrame({'household_id': [1, 2, 2, 3, 3, 3, 4],
778+
'asset_id': ["nl0000301109",
779+
"nl0000289783",
780+
"gb00b03mlx29",
781+
"gb00b03mlx29",
782+
"lu0197800237",
783+
"nl0000289965",
784+
np.nan],
785+
'name': ["ABN Amro",
786+
"Robeco",
787+
"Royal Dutch Shell",
788+
"Royal Dutch Shell",
789+
"AAB Eastern Europe Equity Fund",
790+
"Postbank BioTech Fonds",
791+
np.nan],
792+
'share': [1.0, 0.4, 0.6, 0.15, 0.6, 0.25, 1.0]
793+
},
798794
columns=['household_id', 'asset_id', 'name', 'share']
799795
).set_index(['household_id', 'asset_id'])
800796
portfolio

doc/source/whatsnew/v0.14.1.rst

-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ v0.14.1 (July 11, 2014)
88
.. ipython:: python
99
:suppress:
1010
11-
import pandas as pd
1211
1312
This is a minor release from 0.14.0 and includes a small number of API changes, several new features,
1413
enhancements, and performance improvements along with a large number of bug fixes. We recommend that all
@@ -101,10 +100,8 @@ Enhancements
101100

102101
.. code-block:: python
103102
104-
import pandas as pd
105103
import pandas.tseries.offsets as offsets
106104
107-
108105
day = offsets.Day()
109106
day.apply(pd.Timestamp('2014-01-01 09:00'))
110107

0 commit comments

Comments
 (0)