Skip to content

0.13.1: DataFrame.xs() ValueError: Cannot retrieve view (copy=False) #6894

Closed
@bluefir

Description

@bluefir

I have python 2.7.6 and pandas 0.13.1 on Windows 7.

>>>portfolio_data_all.index.names
FrozenList([u'date', u'stock_id'])
>>>portfolio_data_all.xs(cusip_etf, level=field_stock_id, copy=False)
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-69-5300763cc7b7> in <module>()
----> 1 portfolio_data_all.xs(cusip_etf, level=field_stock_id, copy=False)

C:\Python27\lib\site-packages\pandas\core\generic.pyc in xs(self, key, axis, level, copy, drop_level)
   1261 
   1262             if not copy and not isinstance(loc, slice):
-> 1263                 raise ValueError('Cannot retrieve view (copy=False)')
   1264 
   1265             # level = 0

ValueError: Cannot retrieve view (copy=False)

Metadata

Metadata

Assignees

No one assigned

    Labels

    API DesignIndexingRelated to indexing on series/frames, not to indexes themselves

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions