首页 > TAG信息列表 > cPickle
python 读取.pkl.gz文件
1 import pandas as pd 2 import six.moves.cPickle as cPickle 3 import gzip 4 5 filePath = './a/data.pkl.gz' 6 f = gzip.open(filePath,'rb') 7 df = pd.DataFrame() 8 df = cPickle.load(f) 9 f.close() 10 print(df) 运行结果: