Files
tianxuan/_check_bool.py
T

10 lines
406 B
Python

import csv, os
os.chdir(r'E:\hjq\天璇')
with open('TlsDB.csv', 'r', encoding='utf-8') as f:
reader = csv.DictReader(f)
for row in reader:
dtype = row.get('data_type', '').strip().upper()
code = row.get('field_code', '').strip().lower()
if 'BOOL' in dtype or code in ('cnrs', 'isrs'):
print(f"{row['field_code']:20s} {dtype:15s} {row.get('meaning', '')[:50]}")