Data extraction, File I/O: A list of measurements was downloaded, however the downloaded file includes some text which is not part of the dataset. The file badDataFile.txt is tab limited and includes line breaks. The data is in the following format but appears in random places in the scrambled text file. There are 200 datapoints, they are all integers with 3 or 4 digits. Datapoint: X1 = 986 Datapoint: X2 = 988 Datapoint: X200 = 1019 Read the file using basic file i/o functions b. Use string methods to extract the each data point from the file, make a list of the values. c. Write values of all datapoints in a new file, your file should look like: Data points 986 988 ... 1019

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

this pdf file was converted from text document. i did this in order to put here so you can convert this pdf to .txt format and read with f.readlines() command. extract the necessary data from file and i want you to write code process which extracts data 

 

file:///C:/Users/abdul/Downloads/SodaPDF-converted-badDataFile.pdf

Data extraction, File I/0: A list of measurements was downloaded, however the
downloaded file includes some text which is not part of the dataset. The file badDataFile.txt
is tab limited and includes line breaks. The data is in the following format but appears in
random places in the scrambled text file. There are 200 datapoints, they are all integers with
3 or 4 digits.
Datapoint: X1 = 986
Datapoint: X2 = 988
....
Datapoint: X200 = 1019
а.
Read the file using basic file i/o functions
b. Use string methods to extract the each data point from the file, make a list of the values.
С.
Write values of all datapoints in a new file, your file should look like:
Data points
986
988
...
1019
Transcribed Image Text:Data extraction, File I/0: A list of measurements was downloaded, however the downloaded file includes some text which is not part of the dataset. The file badDataFile.txt is tab limited and includes line breaks. The data is in the following format but appears in random places in the scrambled text file. There are 200 datapoints, they are all integers with 3 or 4 digits. Datapoint: X1 = 986 Datapoint: X2 = 988 .... Datapoint: X200 = 1019 а. Read the file using basic file i/o functions b. Use string methods to extract the each data point from the file, make a list of the values. С. Write values of all datapoints in a new file, your file should look like: Data points 986 988 ... 1019
Expert Solution
steps

Step by step

Solved in 2 steps with 4 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY