Question: Q 3 : Read in data / hip _ small.csv and write out a file data / hip _ bright.csv where you only write out

Q3: Read in data/hip_small.csv and write out a file data/hip_bright.csv where you only write out the lines where V(mag) column is less
than 5. Be sure to remove headers and blank lines.
In [2]: infile = open('data/hip_small.csv','r')
for line in infile:
if line.startswith("#") or line.isspace():
continue
outfile = open ('data/hip_bright.csv','w')
llist = line.split (',')
infile.close()
 Q3: Read in data/hip_small.csv and write out a file data/hip_bright.csv where

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!