中级
统计各类型维修工单平均完成时长
未完成
中级参考
代码结构已给出,请填写 ____ 处
def solve():
from pyodide.http import open_url
from io import StringIO
import pandas as pd
tasks=pd.read_csv(StringIO(open_url(____).read()))
fixed_tasks=tasks[tasks['____']=='____'].copy()
fixed_tasks['____']=(pd.to_datetime(____)-pd.to_datetime(____)).dt.total_seconds()/____
print(____)
print(____)
print(____)
for rtype,grp in fixed_tasks.groupby(____):
print(____)
示例
输入
solve()
期望输出
Completed tasks: 53 Avg repair time: 43.4 hours By repair_type: 充电/换电: avg=41.4h count=7 更换内胎: avg=56.8h count=8 焊接/更换车架: avg=42.2h count=13 维修车锁: avg=39.9h count=8 调整刹车: avg=40.0h count=11 重置仪表盘: avg=41.7h count=6
👑
升级 VIP
解锁全部题目,畅通无阻地学习
- ✓ 解锁全部训练包所有题目
- ✓ 查看完整参考代码和提示
- ✓ 浏览器内直接运行 Python 代码
- ✓ 自动批改 + 进度追踪
30天
¥18
1年
¥99
2年
¥158
3年
¥199