12 lines
284 B
Text
12 lines
284 B
Text
$ cat << EOT > code/extract.py
|
|
|
|
from os.path import join as opj
|
|
import csv
|
|
with open(opj('inputs', 'iris.csv')) as csvfile:
|
|
reader = csv.DictReader(csvfile)
|
|
for row in reader:
|
|
if row['variety'] != 'Setosa':
|
|
continue
|
|
print(row['petal.length'])
|
|
|
|
EOT
|