Converting .pkl file to .csv file
28,736
Simplest and easy way to convert PKL file to csv
import pickle as pkl
import pandas as pd
with open("file.pkl", "rb") as f:
object = pkl.load(f)
df = pd.DataFrame(object)
df.to_csv(r'file.csv')
Author by
Anindita
Updated on March 26, 2021Comments
-
Anindita over 3 years
I am working on a python file that requires large data but I am not able to edit my data. Can someone suggest me a code on how can I convert a .pkl file to .csv file.