Skip to content

Instantly share code, notes, and snippets.

View jstray's full-sized avatar

Jonathan Stray jstray

View GitHub Profile
from collections import Counter
import pandas as pd
df = pd.read_hdf('training.h5')
g = df.groupby('slug')
def get_sample(slug):
return df.ix[g.groups[slug]]