Sunday, December 17, 2017

Getting started with Python Pickle Module for saving objects (serialization)

Pickle can serialize any python objects. Everything in Python is an object so technically many python components can be pickled. The concept is we can save any object and data objects in python into pickle format, of which we can load later, much like csv.

Turn a variable called my_dataframe, my variable name for a Pandas Dataframe into a pickle file with extension pkl.

This tutorial introduces the idea of pickling of Python objections, Python Dictionaries for better loading speed, optimization and note pickling is used in Machine Learning as well.

No comments:

Post a Comment

Convert Tensorflow 1.0 to Tensorflow 2.0

Specify Tensorflow version in Google Colab `%tensorflow_version 2.x`. It is not recommended to use pip install in Google Colab: quote &quo...