Pandas笔记:csv读写操作
import pandas as pd # 读取 data = pd.read_csv("./data/test.csv") print(data.head) # 存储csv data.to_csv("./data/save.csv")
<bound method NDFrame.head of a b c d
0 1 2 3.0 4.0
1 1 2 NaN 4.0
2 1 ? 3.0 4.0
3 1 2 3.0 4.0
4 1 2 3.0 NaN>
存储文件内容