Skip to content

Instantly share code, notes, and snippets.

@GitRay
GitRay / serialize.py
Last active May 24, 2019 06:53 — forked from mrocklin/serialize.py
Serialization benchmark
# This has been edited to work with python3. Some of the tested combinations will not work in python2.
import pandas as pd
df = pd.DataFrame({'text': [str(i % 1000) for i in range(1000000)],
'numbers': range(1000000)})
import pickle
# Python 3 has no cPickle
#import cPickle
import json
from functools import partial