You could just use the tqdm
library for the progress bar instead of creating your own.
from tqdm.notebook import tqdm
for the Jupyter version.tqdm.pandas
integrates with pandas opertations.def myf(row):
row['1'] = 100
return row
tqdm.pandas(desc="Calculating")
df = df.progress_apply(myf, axis=1)