subject

Requirements : you are to create a program in python that performs the following using the pandas packages: 1. loads the ss13hil. csv file that contains the pums dataset (assume it's in the current directory) and create a dataframe object from it.2. create 3 tables: table 1: statistics of hincp - household income (past 12 months), grouped by hht - household/family type table should use the hht types (text descriptions) as the index columns should be: mean, std, count, min, max rows should be sorted by the mean column value in descending ordertable 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 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. table should include marginal values ('all' row and column). any rows containing na values in hhl, access, or wgtp columns should be excluded. table 3: quantile analysis of hincp - household income (past 12 months) rows should correspond to different quantiles of hincp: low (0-1/3), medium (1/3-2/3), high (2/3-1) columns displayed should be: min, max, mean, household_count the household_count column contains entries with the sum of wgtp values for the corresponding range of hincp values (low, medium, or high)3. display the tables to the screen as shown in the sample output on the last page. additional requirements1. the name of your source code file should be tables. py. all your code should be within a single file. 2. you need to use the pandas dataframe object for storing and manipulating data.3. your code should follow good coding practices, including good use of whitespace and use of both inline and block comments.4. you need to use meaningful identifier names that conform to standard naming conventions.5. at the top of each file, you need to put in a block comment with the following information: your name, date, course name, semester, and assignment name.6. the output should exactly match the sample output shown on the last page. what to turn inyou will turn in the single tables. py filehints to get the right output, use the following functions to set pandas display parameters: pd. set_option('display. max_columns', 500)pd. set_option('display. width', 1000) to display entries as percentages, use the applymap method, giving it a string conversion function as input. the string conversion function should take a float value v as an input and output a string representing v as a percentage. to do this, you can use formatting strings or the format() method

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 12:00
Which of these is an example of an integrated presentation? a. a table created in powerpoint b. an image pasted into powerpoint c. a caption created in powerpoint d. an excel chart pasted into powerpoint
Answers: 1
question
Computers and Technology, 24.06.2019 13:00
What are some websites that you can read manga (ex: manga rock)
Answers: 1
question
Computers and Technology, 24.06.2019 18:30
Is a type of bullying that takes place when a person intentionally posts negative information about another that is not true
Answers: 1
question
Computers and Technology, 24.06.2019 21:30
Computer security/cybersecurity1) each of the following code fragments contains a number of security vulnerabilities. for each fragment, identify these security vulnerabilities and, for each vulnerability, discuss at least one way that it could be improved. note that in your discussion of how each vulnerability could be improved, you do not need to re-write a new version of the program in c; simply discuss your solution, either in pseudocode or in 1-2 sentences.a) /* file descriptor leak */#include #include int main(int argc, char *argv[]){ char *filepath = argv[0]; char *shellpath = argv[1]; file *passwords; passwords = fopen(filepath, "r"); /* read the password and do something with it */ /* . . */ /* fork and execute alternative shell */ execl(shellpath, "shell", null); }b)#include /* assume the following function is written for an electronic storefront. the user will enter the id of the item to be ordered, as well as the quantity of units that they would like to purchase. the program will then lookup the price for the price for the item using a predefined function, and return the total cost of the order.*/int gettotalcost(){ char itemid[9]; int price, unitsordered, cost; printf(" enter the 9-digit id of the item to be ordered: "); scanf("%s", & itemid); /* lookup the price according to the itemid */ price = getpricebyid(itemid); printf(" enter the quantity of units to be ordered: "); scanf("%d", & unitsordered); cost = price * unitsordered; return cost; }c)#include /* the following function is intended to return a user's full name by concatenating the user's first and last name into a single string and then returning that string. */char *getfullname(char *firstname, char *lastname, int max_len){ char fullname[max_len]; strcpy(fullname, firstname); strcat(fullname, " "); strcat(fullname, lastname); return fullname; }d)#include /* the following code snippet runs through the list of cli arguments entered and displays them to the console. */int main(int argc, char *argv[]){ int i; printf("you've entered the following arguments: "); for(i = 0; i < argc; i++){ print(argv[i]); printf("\n"); } /* */}
Answers: 2
You know the right answer?
Requirements : you are to create a program in python that performs the following using the pandas pa...
Questions
question
Mathematics, 07.11.2019 02:31
question
Social Studies, 07.11.2019 02:31
Questions on the website: 13722360