topline_summary.py 文件源码

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

项目:python_mozetl 作者: mozilla 项目源码 文件源码
def column_like(name, patterns, default):
    """ patterns: dict[label, list[match_expr]]"""
    # start with the pyspark.sql.functions
    op = F
    for label in patterns:
        cond = reduce(
            operator.__or__,
            [F.col(name).like(pat) for pat in patterns[label]]
        )
        op = op.when(cond, label)
    return op.otherwise(default)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号