Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

python 3 please do not import anything or use try/except csv files : https://drive.google.com/open?id=1njOvJ3dJK92JvxY0jMS8tBON4T33NXxg CsV file: This is a file containing plain text where each

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

python 3 please

do not import anything or use try/except

csv files : https://drive.google.com/open?id=1njOvJ3dJK92JvxY0jMS8tBON4T33NXxg

CsV file: This is a file containing plain text where each line in the file represents one record of information, and each piece of info in the record is separated by a single comma. Luckily the values won't ever contain commas themselves for this project. But they might start or end with non visible characters (e.g. space, tab). Thus, you must remove the leading and trailing spaces when you store the data in a dictionary in memory. The very first line is the header row, which names the columns but is not part of the data, and therefore should not be loaded into memory. Note: the filename extension you use has no effect on the contents; you can edit it and give it any extension you want without changing the ability of your program. In this project we'll be using two kinds of CSV files: votes.csv file: It contains records of votes in the following format: state, candidate, party, popular votes, electoral votes AL, Johnson, IND, 44467, 0 AL, Stein, IND, 9391, 0 AK, Trump, REP, 163387, 9 VA, Clinton, DEM, 1981473, 13 Note: the total number of electoral votes in the file is 531 instead of 538 because 7 votes of the electoral college were not given as promised! abbreviations.csv file: It contains abbreviations of strings in the following format: abbreviation, full_string AL, Alabama AK, Alaska VA, Virginia Johnson, Gary Johnson Stein, Jill Stein IND, Independent REP, Republican DEM, Democratic For storage efficiency all files contain string abbreviations. When we load the files into memory CsV file: This is a file containing plain text where each line in the file represents one record of information, and each piece of info in the record is separated by a single comma. Luckily the values won't ever contain commas themselves for this project. But they might start or end with non visible characters (e.g. space, tab). Thus, you must remove the leading and trailing spaces when you store the data in a dictionary in memory. The very first line is the header row, which names the columns but is not part of the data, and therefore should not be loaded into memory. Note: the filename extension you use has no effect on the contents; you can edit it and give it any extension you want without changing the ability of your program. In this project we'll be using two kinds of CSV files: votes.csv file: It contains records of votes in the following format: state, candidate, party, popular votes, electoral votes AL, Johnson, IND, 44467, 0 AL, Stein, IND, 9391, 0 AK, Trump, REP, 163387, 9 VA, Clinton, DEM, 1981473, 13 Note: the total number of electoral votes in the file is 531 instead of 538 because 7 votes of the electoral college were not given as promised! abbreviations.csv file: It contains abbreviations of strings in the following format: abbreviation, full_string AL, Alabama AK, Alaska VA, Virginia Johnson, Gary Johnson Stein, Jill Stein IND, Independent REP, Republican DEM, Democratic For storage efficiency all files contain string abbreviations. When we load the files into memory

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions

Question

Which products should be restocked?

Answered: 1 week ago

Question

=+ Of the HR issues mentioned in the case,

Answered: 1 week ago