desert_mirage_lib.py 文件源码

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

项目:desert-mirage 作者: valentour 项目源码 文件源码
def partial_convert_only_numerics(df):
    """Convert ``df`` numeric cols and try to coerce any errors encountered."""
    col_dict = df_cols_by_type(df)
    partial_convert = partial(pd.to_numeric, errors='coerce')
    df[col_dict['numeric']].apply(partial_convert)
    return df

# Useful one-liners.
# df.select_dtypes(include=['bool'])
# list(df.select_dtypes(include=['bool']).columns)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号