excel-conditional-comparison-and-large-file-processing

Installation
SKILL.md

excel-conditional-comparison-and-large-file-processing

This sub-skill covers one capability of the Excel workflow. For reading/counting/Parquet optimization, see the parent workflow SKILL.md.

Step1 提取不同Sheet中特定维度(如“B1层”)的数值,并进行跨表逻辑对比。

# 定义提取逻辑:定位目标行(如包含'B1'的行)并获取其关联的系数
def extract_target_value(df, target_label='B1', label_col_idx=0, offset_row=1, value_col_idx=2):
    """
    在指定列搜索标签,并返回其相对偏移位置的数值
    """
    extracted_values = []
    for idx, row in df.iterrows():
        if str(row.iloc[label_col_idx]).strip() == target_label:
            # 提取目标行下方或特定偏移位置的数值
            if idx + offset_row < len(df):
                val = df.iloc[idx + offset_row].iloc[value_col_idx]
                extracted_values.append(val)
    return extracted_values
Installs
2
GitHub Stars
4.9K
First Seen
Jul 3, 2026
excel-conditional-comparison-and-large-file-processing — opensensenova/sensenova-skills