Skip to content
Snippets Groups Projects
Commit 41d3fa0f authored by James D'Alton's avatar James D'Alton
Browse files

Quick draft of python data extraction script for user defined compliance standard(s)

parent f9109fca
No related branches found
No related tags found
No related merge requests found
import csv
with open('<insert text file here>.csv') as compliance_data:
compliance_data_reader = csv.reader(compliance_data, delimiter=',')
line_count = 0
for row in compliance_data_reader:
if line_count == 0:
print(f'Column names are {" ".join(row)}')
line_count += 1
else:
# row[1] is the 2nd column, not row
print(f'{row[0]}\t{row[1]}\t{row[2]}')
line_count += 1
print(f'Processed {line_count} lines.')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment