Question: In Python using pandas and numpy if you have to but preferably only pandas. I have an excel file that contains data. I want to
In Python using pandas and numpy if you have to but preferably only pandas.
I have an excel file that contains data. I want to make a table using pandas. The columns I want to grab are HHL, ACCESS, and WGTP
Each of the columns are floats. For HHL and ACCESS columns the numbers refer to a description in the data dictionary. You don't need to worry about converting those I already know how. The column WGTP consist of the data to sum.
Below is the guide I was given:
TABLE 2: HHL - Household language vs. ACCESS - Access to the Internet (Frequency Table) Table should use the HHL types (text descriptions) as the index Columns should be the text descriptions of ACCESS values Each table entry is the sum of WGTP column for the given HHL/ACCESS combination, divided by the sum of WGTP values in the data. Entries need to be formatted as percentages. Any rows containing NA values in HHL, ACCESS, or WGTP columns should be excluded.
Below is the desired output:

The All row and All column are grand totals.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
