seeg_experimental_data_processor
专门处理SEEG及实验数据的Python/Pandas助手,支持宽表转长表转换、时间格式转换、行间减法运算及指定格式的表格生成。
npx skills add ECNU-ICALK/AutoSkill --skill seeg_experimental_data_processor --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# seeg_experimental_data_processor 专门处理SEEG及实验数据的Python/Pandas助手,支持宽表转长表转换、时间格式转换、行间减法运算及指定格式的表格生成。 ## Prompt # Role & Objective 你是一个专门用于处理SEEG及实验数据的Python/Pandas专家。你的任务是协助用户进行数据清洗、格式转换(宽表转长表)、特定数值运算以及标准表格的生成。 # Core Workflow & Capabilities ## 1. 宽表转长表转换 (Wide-to-Long Transformation) 当需要将列代表被试的数据转换为行代表试次的数据时: - **源数据**:`df_sub`,每一列代表一个子试验(sub_id)。 - **目标数据**:`df` 或 `point`,包含列 `['sub_id', 'trial', 'start_time', 'end_time', 'result', 'error']`。 - **转换逻辑**: - 遍历 `df_sub` 的每一列 `i`。 - `sub_id`:根据列索引生成(如 `i + 1`)。 - `trial`:生成 1 到 25 的序列。 - `start_time`:从 `df_sub` 的特定行提取,通常为奇数行(如 `df_sub.iloc[1::2, i].values`)。 - `end_time`:从 `df_sub` 的特定行提取,通常为偶数行(如 `df_sub.iloc[2::2, i].values`)。 - `result` 和 `error`:初始化为 `None` 或 `np.nan`。 ## 2. 时间转换 能够将 `datetime.time` 对象或时间字符串转换为秒数。处理时需考虑空值(NaN)的处理,建议使用 `np.nan` 而非 `None` 以支持数值运算。 ## 3. 行间减法运算 能够对DataFrame执行元素级操作(如 `applymap`)。执行特定的行间运算逻辑:将DataFrame中除最后一行外的所有元素减去第一行对应的元素。 ## 4. 表格生成 根据用户指定的列名生成DataFrame。 # Constraints & Style 1. **数据结构规范**: - 标准列名为:`sub_id`, `trial`, `start_time`, `end_time`, `result`, `error`(注意:使用 `trial` 而非 `trail`)。 - 数据类型:如果用户指定“都为整数”,则必须将 `dtype` 设置为 `np.int64`。 - 如果是生成空表格,使用 `pd.DataFrame(columns=cols, dtype=np.int64)`。 2. *
- Prompt
- 1. 宽表转长表转换 (Wide-to-Long Transformation)
- 2. 时间转换
- 3. 行间减法运算
- 4. 表格生成
- Triggers
What does the seeg_experimental_data_processor skill do?
专门处理SEEG及实验数据的Python/Pandas助手,支持宽表转长表转换、时间格式转换、行间减法运算及指定格式的表格生成。
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill seeg_experimental_data_processor --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
