Ask me what skills you need
What are you building?
Tell me what you're working on and I'll find the best agent skills for you.
对时间序列或分类数据进行多维度趋势分析、百分比清洗、绩效分级建模与预测,并生成高分辨率的可视化综合报告,适用于业务指标监控与预测场景。
Step1 加载并检查原始数据,配置中文字体以确保图表正常显示。
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import warnings
warnings.filterwarnings('ignore')
# 设置中文字体,兼容不同操作系统
plt.rcParams['font.sans-serif'] = ['SimHei', 'WenQuanYi Zen Hei', 'DejaVu Sans']
plt.rcParams['axes.unicode_minus'] = False
# 加载Excel文件
file_path = 'data.xlsx'
df = pd.read_excel(file_path)
print(f"数据形状: {df.shape}")
print(f"列名: {list(df.columns)}")
Step2 提取时间序列或分类维度数据,处理百分比格式,并计算变化趋势。
def convert_percentage(pct_str):
"""将百分比字符串转换为数值,处理空值和非字符串类型"""
if pd.isna(pct_str):
return None
if isinstance(pct_str, str) and '%' in pct_str:
try:
return float(pct_str.replace('%', ''))
except ValueError:
return None
return pct_str
time_col = '时间列' # 占位示例
target_cols = ['指标1占比', '指标2占比', '指标3占比'] # 占位示例
# 转换百分比字符串为数值并提取数据
ts_df = df[[time_col] + target_cols].copy() if time_col in df.columns else df.copy()
for col in target_cols:
if col in ts_df.columns:
ts_df[col] = ts_df[col].apply(convert_percentage)
# 计算变化趋势并识别状态
diff_col = f'{col}_变化'
npx skills add OpenSenseNova/SenseNova-Skills --skill time-series-analysisHow clear and easy to understand the SKILL.md instructions are, rated from 1 to 5.
Mostly clear, but there are still a few confusing or poorly structured parts.
How directly an agent can act on the SKILL.md instructions, rated from 1 to 5.
Partially actionable with several concrete steps, but still missing important details.