2 Cookbook
This is a repository for short and sweet examples and links for useful pandas recipes. We encourage users to add to this documentation.
Adding interesting links and/or inline examples to this section is a great First Pull Request.
Simplified, condensed, new-user friendly, in-line examples have been inserted where possible to augment the Stack-Overflow and GitHub links. Many of the links contain expanded information, above what the in-line examples offer.
These examples are written for python 3.4. Minor tweaks might be necessary for earlier python versions.
In [1]: import pandas as pd
In [2]: import numpy as np
In [3]: import random
In [4]: import os
In [5]: import itertools
In [6]: import functools
In [7]: import datetime
In [8]: np.random.seed(123456)
In [9]: pd.options.display.max_rows=8
In [10]: import matplotlib
In [11]: matplotlib.style.use('ggplot')
In [12]: np.set_printoptions(precision=4, suppress=True)