Skip to content
Snippets Groups Projects
Commit ffe8fbbd authored by Bert Palm's avatar Bert Palm 🎇
Browse files

fixed pandas bug

parent ec057bcf
No related branches found
No related tags found
No related merge requests found
......@@ -190,7 +190,7 @@ class DictOfSeries:
else:
# work on columns
new = self.copy_empty(columns=False)
new._data = self._data[key]
new._data = self._data.loc[key]
return new
def _slice(self, key):
......@@ -200,7 +200,9 @@ class DictOfSeries:
new = self.copy_empty(columns=False)
for k in self.columns:
new._data.at[k] = self._data.at[k][key]
# bug-fix: must be .loc, simple
# ser[key] may work positional!
new._data.at[k] = self._data.at[k].loc[key]
return new
def _getitem_bool_dios(self, key):
......@@ -235,7 +237,7 @@ class DictOfSeries:
if isinstance(value, pd.Series):
self._insert(key, value)
else:
self._data.at[key].loc[:] = value
self._data.at[key][:] = value
else:
data = self.__getitem__(key)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment