After running apply_and_annotate it would come in handy, if one could obtain the results as a pandas dataframe (like in pingouin). Right now I do this manually by doing something like (not a MRE, just to give you an intution!):
_, results = annotator.apply_and_annotate()
# extract results as data frame
results_pretty = []
for result in results:
group_1 = result.data.group1
group_2 = result.data.group2
stat_value = result.data.stat_value
pvalue = result.data.pvalue
receptor = group_1[0]
sig = result.text
results_pretty.append((receptor,stat_value,pvalue,sig))
results_pretty = pd.DataFrame(results_pretty,columns=['receptor','U','p','sig'])
After running
apply_and_annotate
it would come in handy, if one could obtain the results as a pandas dataframe (like in pingouin). Right now I do this manually by doing something like (not a MRE, just to give you an intution!):