Road to Data Science – Week 2 Day 3

Michael Phelps – Excellence

Focus on correlation is taking firms in the wrong direction

ADHD. Routine everyday.

First 10 minutes is freedom

 

df = pd.DataFrame(np.random.randn(10,4),
columns = [‘col1’, ‘col2’, ‘col3’, ‘col4’],
index = [‘a’,’b’,’c’,’d’, ‘e’, ‘f’,’g’, ‘h’,’i’, ‘j’])

Master the plotting since it is very straightforward

df[‘col4′].plot(figsize=(14,7), fontsize=16,color=’darkorange’, title=’my plot’, rot=90)

Barplot

df[‘col4′].plot(kind=’bar’, figsize=(16,8), fontsize=14)

 

The question of converting $ to item name. So what you can do is strip out the dollar. Convert it to a number with the as float.

Make values

tolist()

chipotle[chipotle.item_name.str.contains(‘Canned’, na=’False’)].choice_description.unique().tolist()

http://treyhunner.com/2015/12/python-list-comprehensions-now-in-color/

 

http://www.tylervigen.com/spurious-correlations

http://datausa.io/

concat – one is horizontal zero is vertical

pd.merge(left=df1, right=df2, how=’outer’)

df1.merge(right=df2, how=’outer’)

 

Seth Klarman

Seth Klarman

 

Leave a comment