Closed sen1 closed 6 years ago
I knew that I could pass a data frame to chi2_contingency. I wan't sure what would happen if I passed everything in. I used this method so that I could play with the chi2_contingency values on different categories (not just Mammal and Bird).
https://github.com/bforsyth744/intro-data-capstone-biodiversity/blob/9fc2b0c2dd140344a070aec6905743b795d0e931/Capstone_Option_2/biodiversity.py.html#L243-L251
You can pass a dataframe to
chi2_contingency
as well. It might not be obvious but it is because pandas is built on top of numpy.