Skip to content

Instantly share code, notes, and snippets.

@boertel
Created October 31, 2014 06:25
Show Gist options
  • Save boertel/be673e30eebf6b2ce869 to your computer and use it in GitHub Desktop.
Save boertel/be673e30eebf6b2ce869 to your computer and use it in GitHub Desktop.
panda
from collections import defaultdict
lost = defaultdict(int)
# df is a dataframe
for d in df.iterrows():
if d['settle_bet'] == 'Nan':
lost[d['game_account_id']] += 1
@dlwong
Copy link

dlwong commented Oct 31, 2014

<3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment