Skip to content

Instantly share code, notes, and snippets.

@csaid
Created March 30, 2016 19:09
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 csaid/a2a57a9e88e6a78716b88f306574f671 to your computer and use it in GitHub Desktop.
Save csaid/a2a57a9e88e6a78716b88f306574f671 to your computer and use it in GitHub Desktop.
from dplython import *
diamonds >> group_by(X.cut) >> summarize(mean_x = np.mean(X.x), var_y = np.var(X.y))
diamonds >> group_by(X.cut) >> mutate(mean_x = np.mean(X.x), var_y = np.var(X.y))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment