1. Write a program to filter table data
An engineer often must review catalog or table data for available parts to determine whether available
parts will satisfy the needs of a given project or design. However, there are usually many more possible
parts than one can conveniently glance at all at once. Having some way of narrowing the available part
data to more closely fit the project constraints can be useful.
The project is to read in some table data and then allow the user to apply limiting constraints to it and
then be able to see which of the parts on the table still satisfy those constraints.
The file name for the Python project, when submitted, must be PythonProject.py.
The table will be some sort of text table, like CylindricalRollerBearingData_01.txt that is
available on CatCourses. It will have three header lines and the third will be the names and units for the
data lines that follow. For that third row, all but the last tab-separated column will be a string with the
title and units for the numerical data in the rows that follow. The last column corresponds to the part
model number, which is will be string in the data rows that follow.
The project code should make no assumption about the header lines, other than what is specified
The rest of the table will have the data corresponding to the columns mentioned in the third header line
above. There can be any number of data lines. All of the data will be numerical and should be treated as
floating point numbers, except for the last column, which is the string representing the model number
for that row's part.
The code should work for other tables with different header lines. It should work with the only change
being the file name of the data file. Changes in the data file might include different numbers of columns,
different column titles and units, etc. The only thing that can be assumed is that the third row will have
the column header information and that all but the last column will be numerical data.
After reading in the table, the script will run in a loop that asks the user whether or not to add limits.
Each limit will be for a particular table column (except for the last column) and will consist of a min and a
max value for that column. The range of possible limits for the data and the current limit should be clear
to the user. Add as many limits as the user wants, then print out the rows of the table that meet the
Get Free Quote!
379 Experts Online