数据加载、存储于文件格式:二进制数据格式pickle

import pandas as pd

frame = pd.read_csv("examples/ex1.csv")
print(frame)
'''
   a   b   c   d message
0  1   2   3   4   hello
1  5   6   7   8   world
2  9  10  11  12     foo
'''
#frame.save("ex_out/frame_pickle")
frame.to_pickle("ex_out/frame_pickle")

#pickle = pd.load("ex_out/frame_pickle")
pickle = pd.read_pickle("ex_out/frame_pickle")
print(pickle)
'''
   a   b   c   d message
0  1   2   3   4   hello
1  5   6   7   8   world
2  9  10  11  12     foo
'''

 

posted @ 2021-02-20 16:14  OTAKU_nicole  阅读(205)  评论(0编辑  收藏  举报