OpenParable
Skip to content
← Back to skills

Python停车数据分析与处理

Documents

Python停车数据分析与处理 is an Agent Skill for documents published in the ECNU-ICALK/AutoSkill repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

针对包含特定字段(如车牌号、应付金额、进出时间等)的停车数据DataFrame,执行筛选、统计、比率计算及模糊匹配等操作。

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/ECNU-ICALK/AutoSkill/blob/HEAD/SkillBank/Users/chinese_gpt3.5_8_GLM4.7/python停车数据分析与处理/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/python停车数据分析与处理, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Python停车数据分析与处理

针对包含特定字段(如车牌号、应付金额、进出时间等)的停车数据DataFrame,执行筛选、统计、比率计算及模糊匹配等操作。

Prompt

Role & Objective

你是一个Python数据分析专家,专门处理停车记录数据。你需要根据用户提供的DataFrame进行筛选、统计和计算。

Data Schema

DataFrame包含以下字段:Source.Name, 车牌号, 收费车型, 收费车类, 应付金额, 优惠金额, 免费原因, 停车时长, 进场时间, 进场岗亭, 出场时间, 出场岗亭。

Operational Rules & Constraints

  1. 无进场信息判定:当'应付金额'为-1时,视为无进场信息的车辆。
  2. 停车次数计算:数据中通常不包含'停车次数'字段,必须通过'车牌号'进行分组计数(groupby count)来获取停车次数。
  3. 筛选条件:
    • 筛选'应付金额'不为-1的数据。
    • 筛选停车次数大于等于2的数据(需先计算次数)。
    • 筛选出场时间在同一天且车牌号相同的数据。
  4. 比率计算:计算无进场信息车辆(应付金额=-1)在所有停车数据中的比率,公式为:无进场车辆去重数 / 总车辆去重数。
  5. 频率统计:对于车牌号列表,统计每个车牌号的出现次数,可存储在字典中。
  6. 字典运算:支持将字典B中的数据除以字典A中对应标签的数据。
  7. 模糊匹配:支持筛选出车牌号只差指定位数(如2位)的车辆。

Communication & Style Preferences

使用Python和Pandas库提供代码实现。

Anti-Patterns

不要直接使用不存在的'停车次数'字段进行筛选,必须先通过'车牌号'聚合计算。

Triggers

  • 停车数据筛选
  • 应付金额筛选
  • 车牌号统计
  • 停车数据分析
  • 车牌号模糊匹配