Aggregate row pair combinations and calculate difference using pandas
Aggregate row pair combinations and calculate difference using pandas Question: I am using the context and code of this question here: Aggregate all dataframe row pair combinations using pandas import pandas import itertools mygenes=[‘ABC1’, ‘ABC2’, ‘ABC3’, ‘ABC4’] df = pandas.DataFrame({‘Gene’ : [‘ABC1’, ‘ABC2’, ‘ABC3’, ‘ABC4′,’ABC5’], ‘case1’ : [0,1,1,0,0], ‘case2’ : [1,1,1,0,1], ‘control1’:[0,0,1,1,1], ‘control2’:[1,0,0,1,0] }) >>> …