【发布时间】:2018-11-21 22:50:14
【问题描述】:
我在 Jupyter 笔记本上使用 tqdm 和 Pandas。
我有一个 Pandas 数据框 df。
当我使用df.progress_apply 时,会打印新行而不是只更新一行。
这是我目前所做的:
tqdm.pandas(desc="Computing MONTH...")
df["MONTH"] = df.progress_apply(compute_month, axis=1)
我的问题不是这个问题的重复:tqdm in Jupyter Notebook
因为他们说使用tqdm_notebook 而不是tqdm。
我不能使用tqdm_notebook,因为我需要实现df.progress_apply。
由于我的代码太重,我无法在最小示例中重现此问题。
这是 Github 中与此问题相关但无法帮助我的问题:https://github.com/tqdm/tqdm/issues/375
【问题讨论】:
标签: python pandas jupyter-notebook tqdm