Skip to content

Instantly share code, notes, and snippets.

@jassinm
Created November 18, 2016 00:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jassinm/dab6ccd40064dd6c6aa3cd4abaa2af34 to your computer and use it in GitHub Desktop.
Save jassinm/dab6ccd40064dd6c6aa3cd4abaa2af34 to your computer and use it in GitHub Desktop.
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)

/tmp/py8494Rwq.png

from tabulate import tabulate
df = pd.DataFrame(np.random.random((4,3)), columns=['A','B','C'])
print tabulate(df, headers="keys", tablefmt="orgtbl")
ABC
00.4090080.1317160.267215
10.9491540.7605750.645162
20.12660.4761230.856961
30.2823860.6061080.409315
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment