# 示例:月度财务汇总import pandas as pd
# SQL 查询数据df =hex.run_sql("""
SELECT month, department, sum(amount) as total
FROM transactions
GROUP BY month, department
""")# Python 分析summary = df.pivot_table( values='total', index='month', columns='department')hex.display(summary)