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
评论列表(0条)