Closed haganbt closed 8 years ago
running=list() keys=list() for cat in moviesdemogs.index.levels[0]: keys.append(cat) demog=moviesdemogs[['unique_authors']].ix[cat].join(usag[['unique_authors']],rsuffix='_baseline') totals=demog.sum() demog['exp_baseline']=demog['unique_authors_baseline']*totals['unique_authors']/totals['unique_authors_baseline'] demog['index']=demog['unique_authors']/demog['exp_baseline'] running.append(demog) normalised=pd.concat(running,keys=keys,names=['category']) #normalised.to_csv('/Users/tim/x.tab',sep='\t') normalised
1) Run duplicate query against external index
Complete in https://github.com/haganbt/pepp