
import pandas as pd

file_l2 = r'/root/.openclaw/workspace-xiaoyan/business_knowledge/L2单词表/L2新版独有单词.xlsx'
file_kb = r'/root/.openclaw/workspace-xiaoyan/business_knowledge/L2单词表/L2知识库-三级+A2.xlsx'

df_l2 = pd.read_excel(file_l2)
df_kb = pd.read_excel(file_kb)

print("=== L2新版独有单词 ===")
print(f"行数: {len(df_l2)}, 列数: {len(df_l2.columns)}")
print(f"列名: {list(df_l2.columns)}")
print(df_l2.head(3).to_string())
print()

print("=== L2知识库-三级+A2 ===")
print(f"行数: {len(df_kb)}, 列数: {len(df_kb.columns)}")
print(f"列名: {list(df_kb.columns)}")
print(df_kb.head(3).to_string())
print()

# 查看"可用"列的内容
if '可用' in df_l2.columns:
    print("=== 可用列的值分布 ===")
    print(df_l2['可用'].value_counts())
    print()
    # 找出可用=1的行
    available = df_l2[df_l2['可用'] == 1]
    print(f"可用=1的行数: {len(available)}")
    print(available.to_string())
