temp_check2.py 792 Bytes
import sys, io
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
import pandas as pd

src = r'C:\Users\jiata\Desktop\问界生态系数生态(生态6.26-7.6&7.1-7.6).xlsx'
sheets = pd.read_excel(src, sheet_name=None, header=None, dtype=object)
sdf = sheets['模板']
print(f'Shape: {sdf.shape}')

# Print first 6 rows focusing on key columns
key_cols = [0,1,2,3,4,36,37,38,43,44,45,48]
for i in range(min(8, len(sdf))):
    vals = []
    for j in key_cols:
        v = sdf.iloc[i, j]
        vals.append(str(v)[:30] if pd.notna(v) else 'NaN')
    print(f'Row{i}: {vals}')

# Also check what the dropdown cutoff date column looks like
print(f'\nRow3 cols 48-50: {[str(sdf.iloc[3,j])[:30] if pd.notna(sdf.iloc[3,j]) else "NaN" for j in range(47,51)]}')