Skip to content

Instantly share code, notes, and snippets.

Created August 31, 2014 15:37
Show Gist options
  • Save anonymous/de5e5ee8cd02f2748c40 to your computer and use it in GitHub Desktop.
Save anonymous/de5e5ee8cd02f2748c40 to your computer and use it in GitHub Desktop.
Pasted from IPython
s = df['A']
s
data['username']
data.T['username']
data = data.T
data
data[7]
data['username']
data['username']['darlene']
data['username']
data2 = pd.read_json('results.json')
data2
data2[7]
data
data.pivot_table(rows=['username'], cols = ['email'])
data.T.pivot_table(rows=['username'], cols = ['email'])
data/pivot_table(rows=['username'], cols=['email'])
data.pivot_table(rows=['username'], cols=['email'])
data.unstack()
data.ix['darlene']
data.T.ix['darlene']
data
data2
data.pivot(index='username', columns=
['email','first_name','last_name','is_superuser','is_staff','project_set','team_set','teammember_set','track_info'])
data.pivot(index='username', columns=
['email','first_name','last_name','is_superuser','is_staff','project_set','team_set','teammember_set','track_info'])
%pastebin 80-105
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment