Skip to content Skip to sidebar Skip to footer

Python : T Test Ind Looping Over Columns Of Df

My dataframe is composed of accounting variables and a dummy variable that allows me to identify two types of company. I would like to perform a t-test for every column of my dataf

Solution 1:

for column_type1, column_type2 in zip(df_type1,df_type2):
print(ttest_ind(df_type1[column_type1],df_type2[column_type2], equal_var=False, nan_policy='omit'))

Post a Comment for "Python : T Test Ind Looping Over Columns Of Df"