-
-
Notifications
You must be signed in to change notification settings - Fork 19.4k
Closed
Description
a=DataFrame(randn(20,2),index=[chr(x+65) for x in range(20)])
a.ix[-1]=a.ix[-2]
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-49-79d0c89159f2> in <module>()
----> 1 a.ix[-1]=a.ix[-2]
/usr/local/lib/python2.7/site-packages/pandas/core/indexing.pyc in __setitem__(self, key, value)
80 indexer = self._convert_to_indexer(key)
81
---> 82 self._setitem_with_indexer(indexer, value)
83
84 def _convert_tuple(self, key):
/usr/local/lib/python2.7/site-packages/pandas/core/indexing.pyc in _setitem_with_indexer(self, indexer, value)
134 value = self._align_frame(indexer, value)
135
--> 136 self.obj.values[indexer] = value
137
138 def _align_series(self, indexer, ser):
ValueError: operands could not be broadcast together with shapes (2) (20)
pandas.__version__
Out[51]: '0.9.0.dev-ba93669'