We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In [33]: df = pd.DataFrame({'A': ['a', 'b', 'c']}, dtype='string') In [34]: df.loc[0:, 'A'] = "test" --------------------------------------------------------------------------- IndexError Traceback (most recent call last) <ipython-input-34-bc65087be9d7> in <module> ----> 1 df.loc[0:, 'A'] = "test" ~/scipy/pandas/pandas/core/indexing.py in __setitem__(self, key, value) 629 key = com.apply_if_callable(key, self.obj) 630 indexer = self._get_setitem_indexer(key) --> 631 self._setitem_with_indexer(indexer, value) 632 633 def _validate_key(self, key, axis: int): ~/scipy/pandas/pandas/core/indexing.py in _setitem_with_indexer(self, indexer, value) 1014 # actually do the set 1015 self.obj._consolidate_inplace() -> 1016 self.obj._data = self.obj._data.setitem(indexer=indexer, value=value) 1017 self.obj._maybe_update_cacher(clear=True) 1018 ~/scipy/pandas/pandas/core/internals/managers.py in setitem(self, **kwargs) 538 539 def setitem(self, **kwargs): --> 540 return self.apply("setitem", **kwargs) 541 542 def putmask(self, **kwargs): ~/scipy/pandas/pandas/core/internals/managers.py in apply(self, f, filter, **kwargs) 417 applied = b.apply(f, **kwargs) 418 else: --> 419 applied = getattr(b, f)(**kwargs) 420 result_blocks = _extend_blocks(applied, result_blocks) 421 ~/scipy/pandas/pandas/core/internals/blocks.py in setitem(self, indexer, value) 1801 1802 check_setitem_lengths(indexer, value, self.values) -> 1803 self.values[indexer] = value 1804 return self 1805 ~/scipy/pandas/pandas/core/arrays/string_.py in __setitem__(self, key, value) 260 raise ValueError("Must provide strings.") 261 --> 262 super().__setitem__(key, value) 263 264 def fillna(self, value=None, method=None, limit=None): ~/scipy/pandas/pandas/core/arrays/numpy_.py in __setitem__(self, key, value) 273 value = np.asarray(value, dtype=self._ndarray.dtype) 274 --> 275 self._ndarray[key] = value 276 277 def __len__(self) -> int: IndexError: arrays used as indices must be of integer (or boolean) type
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
The text was updated successfully, but these errors were encountered: