How to make Pickle file in Python

You can make a Pickle file in Python using Pandas with the given code.

# Import the Pandas library as pd
import pandas as pd

# Initialize a list
a = [[5, 10, 15, 20],
    [25, 30, 35, 40]]

# It will make Pickle File in same folder in which code is running
pd.to_pickle(a, "./data.pkl")

Free Learning Resources

Recommended Laptops

Leave a Comment

Your email address will not be published.