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
import pandas
mix = pandas.MultiIndex.from_tuples([('1a', '2a'), ('1a', '2b'), ('1a', '2c'), ('1b', '2d')])
df = pandas.DataFrame([[1,2,3,4],[5,6,7,8]], columns=mix)
#... manipulate columns here ... but not required to raise error here
df.columns = pandas.MultiIndex.from_tuples(df.columns) #df.columns.values works fine
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\pandas\core\index.py", line 1538, in from_tuples
arrays = list(lib.tuples_to_object_array(tuples).T)
File "inference.pyx", line 687, in pandas.lib.tuples_to_object_array (pandas\src\tseries.c:97580)
IndexError: Out of bounds on buffer access (axis 0)
Is this a miss-use of from_tuples?
import pandas
mix = pandas.MultiIndex.from_tuples([('1a', '2a'), ('1a', '2b'), ('1a', '2c')])
df = pandas.DataFrame([[1,2],[3,4],[5,6]], index=mix)
s = pandas.Series({(1,1): 1, (1,2): 2})
#df['new'] = s.to_dict() # Nice AssertionError about length mismatch
df['new'] = s #bad kaboom on rc2, loads NaNs on b2 as expected
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\pandas\core\frame.py", line 1712, in __setitem__
self._set_item(key, value)
File "C:\Python27\lib\site-packages\pandas\core\frame.py", line 1751, in _set_item
value = self._sanitize_column(key, value)
File "C:\Python27\lib\site-packages\pandas\core\frame.py", line 1778, in _sanitize_column
value = value.reindex(self.index).values
File "C:\Python27\lib\site-packages\pandas\core\series.py", line 2044, in reindex
level=level, limit=limit)
File "C:\Python27\lib\site-packages\pandas\core\index.py", line 791, in reindex
limit=limit)
File "C:\Python27\lib\site-packages\pandas\core\index.py", line 722, in get_indexer
indexer = self._engine.get_indexer(target)
File "engines.pyx", line 245, in pandas.lib.IndexEngine.get_indexer (pandas\src\tseries.c:105931)
File "hashtable.pyx", line 751, in pandas.lib.PyObjectHashTable.lookup (pandas\src\tseries.c:21174)
The text was updated successfully, but these errors were encountered:
Version 0.8.0
* tag 'v0.8.0': (21 commits)
RLS: version 0.8.0
DOC: release notes
BUG: _get_marker_compat insufficient on matplotlib < 1.1.0
BUG: don't use local() in read_* functions, breaks sys.settrace. closepandas-dev#1547
BUG: fix Panel slice setting issue and matplotlib import issues pandas-dev#1548, pandas-dev#1533
ENH: parsers don't use tempfile
ENH: implement DataFrameGroupBy.boxplot(), closepandas-dev#1507
BUG: fix MultiIndex indexing issues in pandas-dev#1537, python 2.5 api fix
BUG: fix incorrect bin labels from cut when labels=False and NA present. closepandas-dev#1511
ENH: support file-like objects in ExcelFile, closepandas-dev#1529
TST: skip test raising unsortable warning on 32-bit windows, other platforms. pandas-dev#1546
BUG: raise exceptions out of trying to parse iso8601 strings
TST: separated test case
BUG: custom colors for bar chart pandas-dev#1540
ENH: add 'time' as inferred_type
ENH: datetime.time converters for plotting
BUG: fix MultiIndex segfault due to internal refactoring. closepandas-dev#1532
BUG: fix MultiIndex compatibility bugs described in pandas-dev#1534 post gutting internal array closepandas-dev#1534
BUG: parser bug when parse_dates is string pandas-dev#1544
BUG: return nameless Series and index from from_csv
...
from mailing list cc @ruidc
The text was updated successfully, but these errors were encountered: