【发布时间】:2020-09-14 12:18:06
【问题描述】:
我想在 tqdm pandas 进度条之前(或之后,并不重要)放一个小描述,如下所示:
import numpy as np
import pandas as pd
from tqdm.auto import tqdm; tqdm.pandas()
a = pd.Series(np.arange(100))
squares = a.progress_map(lambda x: x**2) #this one works
cubes = a.progress_map(lambda x: x**3) #this one works
squares = a.progress_map(lambda x: x**2, desc = 'Computing squares...') #this one doesn't work
cubes = a.progress_map(lambda x: x**3, desc = 'Computing cubes...') #this one doesn't work
那么,如何在进度条中添加描述?
【问题讨论】: