Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

python please The file cereal.scsv contains the nutritional information for over 70 cereals. However it's in a format that is rarely used (semi-colon separated values).

python please image text in transcribed

The file cereal.scsv contains the nutritional information for over 70 cereals. However it's in a format that is rarely used (semi-colon separated values). The reason it's in this format is that a few cereals have commas in their name (e.g. Fruit & Fibre Dates, Walnuts, and Oats). There is a separate lesson on converting this data to a proper csv format. Also note that the first line identifies the column names (the header) The data starts on the second row. Part 1: Getting the column index Create a function named get_column_index that returns the index of the column. It has two parameters: filename_in is the path to the file to read the semicolon separated data file column_name is the name of the column of data we are interested in Restrictions: you must use readlines there's no need to use LessonUtil So if the file for the dataset and 'protein' were passed it, you would return 4

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

Advanced Database Systems

Authors: Carlo Zaniolo, Stefano Ceri, Christos Faloutsos, Richard T. Snodgrass, V.S. Subrahmanian, Roberto Zicari

1st Edition

155860443X, 978-1558604438

More Books

Students also viewed these Databases questions

Question

Who issues commercial paper and for what purpose?

Answered: 1 week ago