Question: Introduction This problem involves some simple data analysis and aims to give you some more practice with combining Python data structures in interesting ways: in

 Introduction This problem involves some simple data analysis and aims togive you some more practice with combining Python data structures in interestingways: in this case, using two-level dictionaries (.e., a dictionary of dictionaries).

Introduction This problem involves some simple data analysis and aims to give you some more practice with combining Python data structures in interesting ways: in this case, using two-level dictionaries (.e., a dictionary of dictionaries). The data, as it happens, is about Pokemon (source: www.kaggle.com). You are to write a program to read in Pokemon data from a file and organize it according to Pokemon type (we will only consider Type 1 for this assignment), then repeatedly read in queries from the user and print out solutions to those queries. Input Format The input file, Pokemon.csv, is in CSV format ("comma-separated values"). This is a simple file format typically used for tabular data such as that for spreadsheets, and if you want you can open this file in a program like Excel or libreoffice to view the data in an easier-to-read form. Any line in the input file that begins with the character(without quotes) is a comment line that should be ignored for data analysis. The first line of the input file, which is a comment line, gives the meaning of the various data columns (in this table, the number at the top of each entry gives its position in a row of comma-separated values, e.g., "Attack" is at position 6) 10 Speed Generation Legendary? 12 Total Specia Special Attack DefenseAttack Defense No. Name Type Type 2 HP Expected Behavior Write a program, in a file pokemon.py, that behaves as follows. 1. Read in the name of a data file. Use the input() function to prompt the user for the file name, but do not supply an argument. This file will be a CSV file containing data about Pokemon in the format described above. It can be the full Pokemon.csv data file, but you can also specify other input files that contain more or less information (e.g., a smaller file may be useful for testing or debugging) 2. Read the data file specified above. Do not use the Python csv module. Organize the data into a data structure that collects together information about different Pokemon types (for this assignment we will consider only the Type 1 field for this, and ignore Type 2 since this is not defined for all Pokemon) 3. Repeatedly read and process queries from the user (see Queries below) until the user enters an empty line. Some examples are given bere

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!