Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

python 3.6 read_file ( filename ) : This is the *only* function that needs to deal with reading a file. It will accept the file

python 3.6

read_file ( filename ) : This is the *only* function that needs to deal with reading a file. It will accept the file name, assume it is a CSV file as described above (with our hurricane date in the same format as the example, but with any number of rows after the header row). It will open the file, read all the described storms, and correctly create the database . It returns that database.

>>>d1 = read_file("file1.csv")

>>>d1

{1992: [('Andrew', 5, 62, 66730)], 2012:

[('Isaac', 1, 5, 24000), ('Sandy', 2, 159,

75000)]}

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

Database Processing

Authors: David Kroenke

11th Edition

0132302675, 9780132302678

More Books

Students also viewed these Databases questions