Created
May 23, 2023 15:59
-
-
Save eisterman/b83a70fe09170e372e10723520f2c9d3 to your computer and use it in GitHub Desktop.
Versione base del filtro fatto a mano per il piccolo Tia
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
with open('input.txt', 'r', encoding='iso-8859-1') as csvfile: | |
reader = csv.reader(csvfile, delimiter=' ') | |
with open('output.txt', 'w', newline='', encoding='iso-8859-1') as outfile: | |
writer = csv.writer(outfile, delimiter=' ') | |
writer.writerow(next(reader)) | |
for row in reader: | |
# 1000, 5, 28, 2 | |
if float(row[1]) > 1000 or float(row[2]) > 5 or float(row[3]) > 28 or float(row[4]) > 2: | |
print(row) | |
writer.writerow(row) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment