Two sample t-test between percents in Python?

Hi guys,

I have a bunch of data in the following format (sorry, it does not format well on here):

Key Indicator-----------First Group------------Second Group


1 Grade change

no change------149------------47,76%-------316-----------32,51%


I am trying to do a T-test to see whether these values are statistically significantly different for Group 1 vs Group 2. It's a bit complicated because the sample size is different for each group AND the mean is in percentages. I did read that this is possible, here:

However, I am unsure how to do it in Python...

I looked up how a regular t-test would work and found this:

from scipy.stats import ttest_ind
ttest_ind(mean1, mean2)

Or something like this?


Can I use one of these and just input the different percentages?