utils.py 文件源码

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

项目:cellranger 作者: 10XGenomics 项目源码 文件源码
def write_csv(df, filename):
    """ Write a pandas dataframe to CSV in a standard way """

    # Verify that the data do not contain commas
    for col in df.select_dtypes([np.object]):
        if df[col].str.contains(',').any():
            raise ValueError("Failed write to %s: Column %s contains commas" % (filename, col))

    df.to_csv(filename, header=True, index=False, sep=',')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号