Continuing with Outlook on Life Surveys 2012 dataset I’ve been working with, in this assignment, I run my first program in Python that showing frequency distributions for my chosen variables and columns, possibly rows, etc. I uploaded the code (.py file) in my Github account on this following link: assignment2.py. The code executes like a charm and produces result as can be seen in text file here.
These are the outputs displays three of variables as frequency tables. I renamed the original label with its description label to be more interpretable, for example I renamed the categorical values, such as: 1, 2, 3 with ‘Strongly Agree’, ‘Somewhat Agree’, ‘Disagree’, etc.
As we can see from the results, Baptist any denomination, Catholic, None, Other Christian and Protestant have count of value more than average of the distribution.
Black and White people attend place of worship higher than average of the distribution.
In the case of political involvement in churches/place of worship, answers of ‘Somewhat Agree’, ‘Somewhat Disagree’, and ‘Strongly Disagree’ are higher than average of the distribution.