You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This means that if you several functions which each do a part of the data processing, you need to know the history of an object to know whether what you're doing works. I think .ix should always succeed on a DataFrame or Series, regardless of how it was constructed.
(I've read the discussion at #6056 about chained operations - but it's not something you can avoid if you have a pipeline of small steps instead of one big step).
This wasn't an issue in 0.11.0 but is failing in 0.13.0 and the latest master. Here's the output of installed versions when running on the master:
commit: None
python: 2.7.3.final.0
python-bits: 64
OS: Linux
OS-release: 2.6.18-308.el5
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_GB
Was just a missing case in core.internals.Block.take
FYI, your example is more clear if you don't name the index/columns the same (just easier to see)
In [1]: df = DataFrame(np.arange(25.).reshape(5,5),
...: index=['a', 'b', 'c', 'd', 'e'],
...: columns=['A', 'B', 'C', 'D', 'E'])
In [2]: z = df[['A', 'C', 'A']]
In [3]: z.ix[['a', 'c', 'a']]
Out[3]:
A C A
a 0 2 0
c 10 12 10
a 0 2 0
[3 rows x 3 columns]
We've found a problem where repeating a row and a column in a DataFrame fails with a "Cannot create BlockManager._ref_locs" assertion error.
The dataframe is very simple:
And we pull the data out like this:
If instead we take a copy of the intermediate step, then it works:
This means that if you several functions which each do a part of the data processing, you need to know the history of an object to know whether what you're doing works. I think .ix should always succeed on a DataFrame or Series, regardless of how it was constructed.
(I've read the discussion at #6056 about chained operations - but it's not something you can avoid if you have a pipeline of small steps instead of one big step).
This wasn't an issue in 0.11.0 but is failing in 0.13.0 and the latest master. Here's the output of installed versions when running on the master:
commit: None
python: 2.7.3.final.0
python-bits: 64
OS: Linux
OS-release: 2.6.18-308.el5
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_GB
pandas: 0.13.0-292-g4dcecb0
Cython: 0.16
numpy: 1.7.1
scipy: 0.9.0
statsmodels: None
patsy: None
scikits.timeseries: None
dateutil: 1.5
pytz: None
bottleneck: 0.6.0
tables: 2.3.1-1
numexpr: 2.0.1
matplotlib: 1.1.1
openpyxl: None
xlrd: 0.8.0
xlwt: None
xlsxwriter: None
sqlalchemy: None
lxml: 2.3.6
bs4: None
html5lib: None
bq: None
apiclient: None
The text was updated successfully, but these errors were encountered: