Because I am comparing two ratios whose values come from two samples and range from 0 to 1,   both proportion z-test and proportion chi-square test can be adopted. I finally use the proportion z-test method because  I'm more familiar with it.
I use the function from statsmodels.stats.proportion to do the test in ipython notebook: