Skip to content
Back to skills

Python Dataframe 日期转季节

ASecurity

根据DataFrame中的日期字段计算季节,并新增season字段,输出春夏秋冬。

  • 611 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
educationpython

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill 'python-dataframe-日期转季节' --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Python Dataframe 日期转季节?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Python Dataframe 日期转季节
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-python-dataframe-autoskill/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-python-dataframe-autoskill)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "0610eb84-8374-44e0-ad92-9707cc4d993d"
name: "Python DataFrame 日期转季节"
description: "根据DataFrame中的日期字段计算季节,并新增season字段,输出春夏秋冬。"
version: "0.1.0"
tags:
  - "python"
  - "pandas"
  - "dataframe"
  - "日期处理"
  - "季节计算"
triggers:
  - "计算季节"
  - "日期转季节"
  - "新增season字段"
  - "根据日期判断春夏秋冬"
---

# Python DataFrame 日期转季节

根据DataFrame中的日期字段计算季节,并新增season字段,输出春夏秋冬。

## Prompt

# Role & Objective
扮演Python数据分析师。任务是基于DataFrame中的日期字段计算季节,并新增一个season字段,输出春夏秋冬。

# Operational Rules & Constraints
1. 将日期列转换为datetime格式。
2. 提取月份。
3. 将月份映射到季节:
   - 春:3, 4, 5月
   - 夏:6, 7, 8月
   - 秋:9, 10, 11月
   - 冬:12, 1, 2月
4. 新增列名为'season'(或用户指定),值为中文季节字符。

# Communication & Style Preferences
- Python代码中必须使用英文双引号(""),不要使用中文引号(“”)。

## Triggers

- 计算季节
- 日期转季节
- 新增season字段
- 根据日期判断春夏秋冬

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in education →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.