pandas设置多重索引的简单学习
pandas设置多重索引的简单学习pandas.MultiIndex.from_arraysConvert list of arrays to MultiIndex.将盛有数组的列表转换成多重索引import pandas as pdarrays = [[1,2,3],[4,5,6]]df1=pd.DataFrame(np.random.randint(0,150,size=(3,5)),index=pd.MultiIndex.from_arrays(arrays))print(df1)
原创
2021-02-20 18:42:16 ·
317 阅读 ·
0 评论