pandas - swifter module not showing progress bar in python - Stack Overflow

I have a pandas df with 1M records. I Need to apply a function to get the new column. To do so, I use s

I have a pandas df with 1M records. I Need to apply a function to get the new column. To do so, I use swift to run the apply in parallel.

swift module is working fine but as mentioned here, I don't see the progress bar with Actual progress. All I see is only 0% after completing the step execution too.

import pandas as pd
import swifter

def get_length(row):
    return len(str(row['col1']))

if __name__ == '__main__':
    df = pd.read_csv("file1.csv", dtype=str)
    df['newval'] = df.swifter.allow_dask_on_strings(enable=True).progress_bar(enable=True, desc="Test").apply(get_length, axis=1)
  

Below is the screenshot of progress bar (it is showing 0% even after execution completed)

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745584867a4634473.html

相关推荐

  • pandas - swifter module not showing progress bar in python - Stack Overflow

    I have a pandas df with 1M records. I Need to apply a function to get the new column. To do so, I use s

    8小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信