import pandas as pd a=pd.DataFrame({'a':[1,2,3],'b':[4,5,6],'c':[7,8,9]}) print(a) b=a.values#转换方法 print(b)
输出:
a b c 0 1 4 7 1 2 5 8 2 3 6 9 [[1 4 7] [2 5 8] [3 6 9]]