import numpy as np
import pandas as pd
import matplotlib as mpl
import matplotlib.pyplot as plt
import pandas as pd
graylevel = 1.0
mpl.rc('figure', facecolor = (graylevel, graylevel, graylevel), edgecolor ='r')
%pylab inline
fig = plt.figure(facecolor='white')
plt.hist(np.random.randn(20000), bins=100)

from tabulate import tabulate
df = pd.DataFrame(np.random.random((4,3)), columns=['A','B','C'])
print tabulate(df, headers="keys", tablefmt="orgtbl")
| A | B | C |
0 | 0.409008 | 0.131716 | 0.267215 |
1 | 0.949154 | 0.760575 | 0.645162 |
2 | 0.1266 | 0.476123 | 0.856961 |
3 | 0.282386 | 0.606108 | 0.409315 |