数据加载、存储于文件格式:二进制数据格式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 '''
本文来自博客园,作者:OTAKU_nicole,转载请注明原文链接:https://www.cnblogs.com/nicole-zhang/p/14417275.html