import pandas as pd #Calculate the rank of each column df = pd.DataFrame(data) ranks = df.rank(na_option='top') #Check whether each column has duplicate ranks check_list = [] for col in ranks: check_list.append(len(ranks[col].unique()) == len(ranks)) #If there are duplicate ranks, return False if F alse in check_list: print('False') else: print('True')
Please write a pandas code for batch rank sum test, the program must be able to handle missing values
Guess you like
Origin blog.csdn.net/weixin_35749440/article/details/129486119
Recommended
Ranking