← 返回题库
中级

识别高耗能设备

未完成
中级参考 代码结构已给出,请填写 ____ 处
def solve():
    from pyodide.http import open_url
    from io import StringIO
    import pandas as pd
    energy_csv = open_url(____).read()
    devices_csv = open_url(____).read()
    energy = pd.read_csv(StringIO(____))
    devices = pd.read_csv(StringIO(____))
    device_energy = energy.groupby(____)['____'].sum()
    devices['____'] = devices['____'].map(____)
    high = devices[devices['____'] > devices['____'].quantile(____)]
    print(____)
    for _, r in high.iterrows():
        print(____)

示例

输入
solve()
期望输出
高耗能设备数量: 15
D001: 125.50度
...
Python 代码 🔒 登录后使用
🔒

登录后即可练习

注册免费账号,在浏览器中直接运行 Python 代码