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
Sorry if there is a specific reason why this is not supported, but with boolean dataframe indexing, I would expect the following to work:
http://pandas.pydata.org/pandas-docs/dev/indexing.html#indexing-a-dataframe-with-a-boolean-dataframe
In [36]: df_rand = pd.DataFrame(np.random.randn(10,10)) In [37]: df_rand < 0 Out[37]: 0 1 2 3 4 5 6 7 8 9 0 False False True False True False True False True True 1 False True True False True False False True False True 2 True True True False True False False True False False 3 False False True False True True True False False True 4 True False False True False False True False False False 5 False False False False False False False False False False 6 False True False False True True True False False True 7 False False False True False False True False True False 8 True True True False True True True False False False 9 False False True True True False True True True False In [38]: df_rand[df_rand < 0] = -0.1 In [39]: df_rand[df_rand < 0] += 0.1 --------------------------------------------------------------------------- ValueError Traceback (most recent call last) C:\Python27\Scripts\<ipython-input-39-6dc58d9235e9> in <module>() ----> 1 df_rand[df_rand < 0] += 0.1 C:\Python27\lib\site-packages\pandas\core\frame.pyc in __getitem__(self, key) 1655 return self._getitem_multilevel(key) 1656 else: -> 1657 return self._get_item_cache(key) 1658 1659 def _getitem_array(self, key): C:\Python27\lib\site-packages\pandas\core\generic.pyc in _get_item_cache(self, item) 479 from pandas.core.frame import DataFrame 480 if isinstance(item, DataFrame): --> 481 raise ValueError('Cannot index using (boolean) dataframe') 482 raise 483 ValueError: Cannot index using (boolean) dataframe In [40]: print pd.__version__ 0.8.0b1
The text was updated successfully, but these errors were encountered:
I have to see if this is possible (it should be theoretically); it wasn't a deliberate choice one way or the other.
Sorry, something went wrong.
2e537fd
This is implemented in git master now, will be part of next beta or the final 0.8.0 release
No branches or pull requests
Sorry if there is a specific reason why this is not supported, but with boolean dataframe indexing, I would expect the following to work:
http://pandas.pydata.org/pandas-docs/dev/indexing.html#indexing-a-dataframe-with-a-boolean-dataframe
The text was updated successfully, but these errors were encountered: