dataframe转换为多维矩阵,然后可以使用values来实现
import pandas as pd
import numpy as np
df = pd.DataFrame(np.random.rand(3,3),columns=list('abc'),index=list('ABC'))
print(df)
print('============')
print(df.values)
原文链接:https://blog.csdn.net/WMN7Q/article/details/78508948