标签: python pandas
显然元组作为索引不起作用?还是这里出了什么问题?
import pandas as pd dd=pd.DataFrame(["a"], index=[(0,1)]) dd.loc[(0, 1)] # TypeError: cannot do label indexing on <class 'pandas.core.indexes.base.Index'> with these indexers [0] of <class 'int'>