读写csv文件
- 写入
df.to_csv(filename) - 读取
pd.read_csv(filename,header=0) #保留列属性,header=None不读列属性
import pandas as pd
df = pd.read_csv('E:\\machine learning\\test\\iris.data', header=None)
print(df.tail())
import pandas as pd
df = pd.read_csv('E:\\machine learning\\test\\iris.data', header=None)
print(df.tail())