15 lines
675 B
Python
15 lines
675 B
Python
import pandas as pd
|
|
|
|
for yr in ['2019', '2020', '2021', '2022', '2023']:
|
|
fpath = f'Data_Tracerstudy/Data_{yr}_Tracer_study.csv'
|
|
df = pd.read_csv(fpath, sep=';', encoding='utf-8-sig', nrows=2)
|
|
print(f"\n{'='*20} {yr} ({len(df.columns)} columns) {'='*20}", flush=True)
|
|
cols = list(df.columns)
|
|
# Print columns matching f16 or f4
|
|
f16_cols = [c for c in cols if '16' in c.lower()]
|
|
f4_cols = [c for c in cols if 'f4' in c.lower() or '40' in c.lower() or '41' in c.lower()]
|
|
print("Columns matching 16:", f16_cols, flush=True)
|
|
print("Columns matching 4:", f4_cols, flush=True)
|
|
# Also print all columns
|
|
print("ALL COLS:", cols, flush=True)
|