← 返回题库
中级

分析复习间隔分布规律

未完成
中级参考 代码结构已给出,请填写 ____ 处
def solve():
    from pyodide.http import open_url
    from io import StringIO
    import pandas as pd
    schedules=pd.read_csv(StringIO(open_url(____).read()))
    review_cards=schedules[schedules['____']=='____']
    bins=[____,____,____,____,____,____]
    labels=['____','____','____','____','____']
    review_cards=review_cards.copy()
    review_cards['____']=pd.cut(____)
    dist=dict(review_cards.groupby(____).size())
    total=len(____)
    print(____)
    for r,c in dist.items():
        bar='____'*int(____) if total>____ else '____'
        print(____)

示例

输入
solve()
期望输出
Interval distribution (review cards: 653):
  1-7d: xxx 120 (18.4%)
  8-30d: xxx 111 (17.0%)
  31-90d: xxx 120 (18.4%)
  91-180d: xx 73 (11.2%)
  181d+: xx 82 (12.6%)
Python 代码 🔒 登录后使用
🔒

登录后即可练习

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