data.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:mars_express 作者: wsteitz 项目源码 文件源码
def parse_context_dmop(path):
    df = read(path, "dmop")

    # ATTT-A and ATTT-B are different
    attt = df[df['subsystem'].str.startswith("ATTT")]
    attt['subsystem'] = attt['subsystem'].str[:3] + attt['subsystem'].str[-1]

    df = pd.concat([attt, df])

    # take the first 4 chars
    df['subsystem'] = df['subsystem'].str[:4]

    # convert to 1 / 0
    df = pd.get_dummies(df.subsystem)
    df = df.resample("1h").sum().fillna(0.0)

    df['sum_dmop'] = df.sum(axis=1)

    return df
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号