import csv import io import os def check_lines(f): if not os.path.exists(f): print(f"File {f} not found.") return with open(f, 'rb') as file: content = file.read().decode('utf-8-sig') reader = csv.DictReader(io.StringIO(content), delimiter=';') count = 0 for row in reader: if row.get('Currency_Code') == 'EUR' and row.get('Invoice_Date', '') >= '2024-01-01': print(f"Inv: {row.get('Invoice_Number')} | CCY: {row.get('Currency_Code')} | FX: {row.get('Revenue_FX')} | SEK_ERP: {row.get('Revenue_SEK_ERP')} | SEK_Final: {row.get('Revenue_SEK_Final')}") count += 1 if count >= 5: break if __name__ == "__main__": check_lines("assets/fact_invoice_lines.csv")