Purpose: Produce a new column-based (e.g. dict[str, list[str]]) table with only a specific subset of the original columns. Why: Many data tables will contain many columns that are not related to the...


In python don't import libraries


Purpose: Produce a new column-based (e.g. dict[str, list[str]]) table with only a<br>specific subset of the original columns.<br>Why: Many data tables will contain many columns that are not related to the analysis you are<br>trying to perform. Selecting only the columns you care about makes it easier to focus your<br>attention on the problem at hand.<br>Function Name: select<br>• Parameters:<br>1. dict[str, list[str]]-a column-based table of data that will not be mutated<br>2. list[str]- the names of the columns to copy to the new, returned dictionary<br>• Return type: dict[str, list[str]]<br>Implementation strategy:<br>1. Establish an empty dictionary that will serve as the returned dictionary this function is<br>building up.<br>2. Loop through each of the columns in the second parameter of the function<br>1. Assign to the column key of the result dictionary the list of values stored in the<br>input dictionary at the same column<br>3. Return the dictionary produced<br>

Extracted text: Purpose: Produce a new column-based (e.g. dict[str, list[str]]) table with only a specific subset of the original columns. Why: Many data tables will contain many columns that are not related to the analysis you are trying to perform. Selecting only the columns you care about makes it easier to focus your attention on the problem at hand. Function Name: select • Parameters: 1. dict[str, list[str]]-a column-based table of data that will not be mutated 2. list[str]- the names of the columns to copy to the new, returned dictionary • Return type: dict[str, list[str]] Implementation strategy: 1. Establish an empty dictionary that will serve as the returned dictionary this function is building up. 2. Loop through each of the columns in the second parameter of the function 1. Assign to the column key of the result dictionary the list of values stored in the input dictionary at the same column 3. Return the dictionary produced

Jun 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here