df = pd.read_csv(base_path + ‘graph_csv_muli_null.csv’,header=0,index_col=0)
一个是用自己指定的行,一个是用自己指定的列,记得最后to_csv()时不要加index参数
本文介绍使用Python的Pandas库读取CSV文件的方法,包括指定行和列进行读取,以及在保存时如何避免包含索引。适用于数据处理和分析的初学者。
df = pd.read_csv(base_path + ‘graph_csv_muli_null.csv’,header=0,index_col=0)
一个是用自己指定的行,一个是用自己指定的列,记得最后to_csv()时不要加index参数
1652