Skip to content

Instantly share code, notes, and snippets.

@jamesp
Created December 13, 2013 11:53
Show Gist options
  • Save jamesp/7943223 to your computer and use it in GitHub Desktop.
Save jamesp/7943223 to your computer and use it in GitHub Desktop.
import pandas as pd
p = pd.read_csv('m:/presents.csv')
p[:10]
plt.plot(p[:10])
p.columns= 'id x y z'.split()
p['volume'] = p.x * p.y * p.z
p['avg_dim'] = (p.x + p.y + p.z) / 3.0
p['std_dim'] = np.std(zip(p.x, p.y, p.z), axis=1)
p[:10]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment