From a6a9d4b5ee361fabfbcdd25e1771ae364a615cc0 Mon Sep 17 00:00:00 2001 From: Bert Palm <bert.palm@ufz.de> Date: Thu, 19 Mar 2020 22:23:37 +0100 Subject: [PATCH] minor bug fix, and test fix --- dios/indexer.py | 6 +++--- test/test__setget__loc.py | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/dios/indexer.py b/dios/indexer.py index 674879b..a2b0c6f 100644 --- a/dios/indexer.py +++ b/dios/indexer.py @@ -66,7 +66,7 @@ class _Indexer: raise KeyError(rowkey) else: # cannot set to empty series - if len(dat.iloc[rowkey]) == 0: + if len(dat_xloc[rowkey]) == 0: continue dat_xloc[rowkey] = val @@ -254,9 +254,9 @@ class _aLocIndexer(_Indexer): return self def __getitem__(self, key): + # currently lowdim from the next call is + # not used, so we always return a dios rowkeys, colkeys, _ = self._unpack_key_aloc(key) - # currently lowdim is not used and we always - # return a dios data = pd.Series(dtype='O', index=colkeys) kws = dict(itype=self.obj.itype, cast_policy=self.obj._policy) diff --git a/test/test__setget__loc.py b/test/test__setget__loc.py index 5536055..8e6ebb7 100644 --- a/test/test__setget__loc.py +++ b/test/test__setget__loc.py @@ -36,7 +36,6 @@ def test__setitem_loc_singleCol(dios_aligned, idxer, exp): VALS = [99, - pd.Series(range(4, 10), index=range(4, 10)), ] -- GitLab