File tree 5 files changed +14
-2
lines changed
5 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ pandas 0.13
62
62
- deprecated ``iterkv ``, which will be removed in a future release (was just
63
63
an alias of iteritems used to get around ``2to3 ``'s changes).
64
64
(:issue: `4384 `, :issue: `4375 `, :issue: `4372 `)
65
+ - ``Series.get `` with negative indexers now returns the same as ``[] `` (:issue: `4390 `)
65
66
66
67
**Experimental Features **
67
68
@@ -87,6 +88,7 @@ pandas 0.13
87
88
dtypes, surfaced in (:issue: `4377 `)
88
89
- Fixed bug with duplicate columns and type conversion in ``read_json `` when
89
90
``orient='split' `` (:issue: `4377 `)
91
+ - Fix ``.iat `` indexing with a ``PeriodIndex `` (:issue: `4390 `)
90
92
91
93
pandas 0.12
92
94
===========
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ API changes
29
29
- deprecated ``iterkv``, which will be removed in a future release (was just
30
30
an alias of iteritems used to get around ``2to3``'s changes).
31
31
(:issue:`4384`, :issue:`4375`, :issue:`4372`)
32
+ - ``Series.get`` with negative indexers now returns the same as ``[]`` (:issue:`4390`)
32
33
33
34
Enhancements
34
35
~~~~~~~~~~~~
Original file line number Diff line number Diff line change @@ -1018,7 +1018,7 @@ def get_value(self, label):
1018
1018
-------
1019
1019
value : scalar value
1020
1020
"""
1021
- return self .index ._engine . get_value (self , label )
1021
+ return self .index .get_value (self , label )
1022
1022
1023
1023
def set_value (self , label , value ):
1024
1024
"""
Original file line number Diff line number Diff line change @@ -629,7 +629,7 @@ def test_getitem_get(self):
629
629
self .assertEqual (self .series [idx1 ], self .series [5 ])
630
630
self .assertEqual (self .objSeries [idx2 ], self .objSeries [5 ])
631
631
632
- self .assert_ (self .series .get (- 1 ) is None )
632
+ self .assertEqual (self .series .get (- 1 ), self . series . get ( self . series . index [ - 1 ]) )
633
633
self .assertEqual (self .series [5 ], self .series .get (self .series .index [5 ]))
634
634
635
635
# missing
Original file line number Diff line number Diff line change @@ -1323,6 +1323,15 @@ def test_as_frame_columns(self):
1323
1323
ts = df ['1/1/2000' ]
1324
1324
assert_series_equal (ts , df .ix [:, 0 ])
1325
1325
1326
+ def test_indexing (self ):
1327
+
1328
+ # GH 4390, iat incorrectly indexing
1329
+ index = period_range ('1/1/2001' , periods = 10 )
1330
+ s = Series (randn (10 ), index = index )
1331
+ expected = s [index [0 ]]
1332
+ result = s .iat [0 ]
1333
+ self .assert_ (expected == result )
1334
+
1326
1335
def test_frame_setitem (self ):
1327
1336
rng = period_range ('1/1/2000' , periods = 5 )
1328
1337
rng .name = 'index'
You can’t perform that action at this time.
0 commit comments