# industrial-data-cleaner **Repository Path**: hechen_L/industrial-data-cleaner ## Basic Information - **Project Name**: industrial-data-cleaner - **Description**: No description available - **Primary Language**: Python - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-06-18 - **Last Updated**: 2026-06-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### start_stop_cleaner.py 本脚本用于对设备启停记录进行标准化清洗,确保事件流的确定性与逻辑一致性。 #### 清洗步骤: 1. **基础预处理**:读取 CSV,进行时间戳格式转换,并剔除无效或缺失的数据行。 2. **物理校准**:按照时间戳进行升序排序,并剔除物理上完全重复的记录。 3. **冲突处理**:剔除同一时间点下状态冲突(状态不唯一)的异常记录。 4. **状态压缩**:将连续的状态记录压缩,只保留状态发生切换的起始点。 5. **业务约束**:强制校验数据序列,确保清洗结果以停机状态(状态 `0`)作为起始。 #### 使用方法: ```bash python start_stop_cleaner.py <时间列名> <状态列名> ``` #### 示例: ```bash python start_stop_cleaner.py .\xxx_event.csv timestamp origin_value ```