@@ -8,7 +8,6 @@ v0.14.0 (May 31 , 2014)
8
8
.. ipython :: python
9
9
:suppress:
10
10
11
- import pandas as pd
12
11
13
12
This is a major release from 0.13.1 and includes a small number of API changes, several new features,
14
13
enhancements, and performance improvements along with a large number of bug fixes. We recommend that all
@@ -73,12 +72,11 @@ API changes
73
72
74
73
.. code-block :: python
75
74
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
78
77
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
82
80
83
81
- Slicing with negative start, stop & step values handles corner cases better (:issue: `6531 `):
84
82
@@ -218,12 +216,12 @@ API changes
218
216
219
217
.. code-block :: python
220
218
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
225
223
226
- NotImplementedError: operator '/' not implemented for bool dtypes
224
+ NotImplementedError : operator ' /' not implemented for bool dtypes
227
225
228
226
- In `` HDFStore`` , `` select_as_multiple`` will always raise a `` KeyError `` , when a key or the selector is not found (:issue:`6177 ` )
229
227
- `` 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
504
502
505
503
.. code-block :: python
506
504
507
- df.loc[(slice (' A1' , ' A3' ), ... .. ), :]
505
+ >> > df.loc[(slice (' A1' , ' A3' ), ... ), :] # noqa: E901
508
506
509
507
rather than this:
510
508
511
509
.. code-block :: python
512
510
513
- df.loc[(slice (' A1' , ' A3' ), ... ..)]
511
+ >> > df.loc[(slice (' A1' , ' A3' ), ... )] # noqa: E901
514
512
515
513
.. warning ::
516
514
@@ -769,32 +767,30 @@ Enhancements
769
767
770
768
.. ipython :: python
771
769
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
+ },
777
774
columns = [' household_id' , ' male' , ' wealth' ]
778
775
).set_index(' household_id' )
779
776
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
+ },
798
794
columns = [' household_id' , ' asset_id' , ' name' , ' share' ]
799
795
).set_index([' household_id' , ' asset_id' ])
800
796
portfolio
0 commit comments