刚开始了解pandas,寻求Python中对矩阵的操作

#coding=utf-8import pandas as pddf = pd.read_csv("your_csvfile.csv",encoding="gb18030")new_df = df.fillna(0)row_array = new_df.values.tolist() # 2_dim array,each row is an arraycolumn_1 = list(new_df.column_1)column_2 = list(new_df.column_2)...column_n = list(new_df.column_n)orcolumn_array = new_df.T.values.tolist() # 2_dim arrary,each column is an array参考:API Reference - pandas 0.19.2 documentation


    推荐阅读