Top "Pickle" questions

An object serialization module for Python.

copy.deepcopy vs pickle

I have a tree structure of widgets e.g. collection contains models and model contains widgets. I want to copy …

python pickle deep-copy
Why can't generators be pickled?

Python's pickle (I'm talking standard Python 2.5/2.6/2.7 here) cannot pickle locks, file objects etc. It also cannot pickle generators and lambda …

python generator pickle python-stackless
python - No module named dill while using pickle.load()

I have dill installed in my python 2.7 but when I try to unpickle my model it says "No module named …

python pandas pickle dill
Exclude object's field from pickling in python

I would like to avoid pickling of certain fields in an instance of a class. Currently, before pickling I just …

python pickle
Python, cPickle, pickling lambda functions

I have to pickle an array of objects like this: import cPickle as pickle from numpy import sin, cos, array …

python arrays numpy lambda pickle
Why am I getting an error about my class defining __slots__ when trying to pickle an object?

I'm trying to pickle an object of a (new-style) class I defined. But I'm getting the following error: >>&…

python pickle slots
how to find user id from session_data from django_session table?

In django_session table session_data is stored which is first pickled using pickle module of python and then encoded …

python django pickle pinax
Convert Pandas DataFrame to bytes-like object

Hi I am trying to convert my df to binary and store it in a variable. my_df: df = pd.…

pandas binary pickle bytesio
Python: why pickle?

I have been using pickle and was very happy, then I saw this article: Don't Pickle Your Data Reading further …

python pickle
Multiprocessing on Windows breaks

I develop with Python on Linux and have never really seen this sort of problem with Windows. I'm using the …

python multiprocessing pickle traceback