ai_member_xiaoyan/check_kb_structure.py

15 lines
360 B
Python

import pandas as pd
file_kb = r'/root/.openclaw/workspace-xiaoyan/business_knowledge/L2单词表/L2知识库-三级+A2.xlsx'
df = pd.read_excel(file_kb)
print(f"行数: {len(df)}, 列数: {len(df.columns)}")
print(f"列名: {list(df.columns)}")
print()
print("前5行:")
print(df.head(5).to_string())
print()
print("后5行:")
print(df.tail(5).to_string())