How to create an empty Pickle file in Python

You can create an empty Pickle file in Python using Pandas with the given code.

# Import the Pandas library as pd
import pandas as pd

# Empty list
a = []

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

Free Learning Resources

Recommended Laptops

Leave a Comment

Your email address will not be published.