In [1]:
%config InlineBackend.figure_format = 'retina'
%matplotlib inline
import numpy as np
import scipy as sp
import matplotlib.pyplot as plt
import pandas as pd
import pandasql
import seaborn as sns
sns.set_style("white")
In [2]:
import util
df = util.load_burritos()
N = df.shape[0]
In [3]:
means = df.mean()
variances = df.var()
In [4]:
print means
print variances
people are most critical of salsa, least critical of wrap integrity people are most sensitive to wrap integrity and least sensitive to Fillings (overall???)
In [30]:
from ggplot import *
print ggplot(df,aes('Meat','Fillings',color='overall')) +\
geom_point(size=120,alpha=.2) +\
xlab('Meat rating') + ylab('Fillings rating') +\
scale_color_gradient(low = 'red', high = 'blue')
In [32]:
import re
s = "string. With. Punctuation?"
s = re.sub(r'[^\w\s]','',s)
print s
In [34]:
x = ['x','y','z']
a = 'x'
if a in x:
print 'yes'
else:
print 'no'
In [35]:
w = {'e':2,'f':4}
w.keys()
Out[35]:
In [ ]: