tqdm搭配pandas的progress_apply显示进度条
tqdm 是一个快速,可扩展的Python进度条库。使用起来很方便,能随时查看程序的运行进度。
tqdm搭配for循环
from tqdm import tqdm
for i in tqdm(range(10)):
print("来看看进度条的效果!")
tqdm搭配pandas的progress_apply使用
在使用dataframe.apply进行数据分析时候,想知道进度情况,怎么办?
tqdm搭配progress_apply使用
from tqdm import tqdm
tqdm.pandas(desc='pandas bar')
df_result = df['score'].progress_apply(lambda x: str(x)[0:7])
————————————————
版权声明:本文为CSDN博主「lanyuelvyun」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/lanyuelvyun/article/details/126661201