Pickling a DataFrame
问题 I am trying to pickle a DataFrame with import pandas as pd from pandas import DataFrame data = pd.read_table('Purchases.tsv',index_col='coreuserid') data.to_pickle('Purchases.pkl') I have been running on "data" for a while and have had no issues so I know it is not a data corruption issue. I am thinking likely syntax but I have tried a number of variants. I hesitate to give the whole error message but it ends with: \pickle.pyc in to_pickle(obj, path) 13 """ 14 with open(path, 'wb') as f: 15