[英]How do you read HTML in Pandas with a dynamic table with no updating URL?
[英]In Jupyter, do you do a running update (hide) a pandas table as you are updating it?
在 Jupyter 中,我正在運行一個長時間運行的計算。
我想展示一個前 25 行的 Pandas 表。 前 25 名可能會在每次迭代中更新。
但是,我不想展示很多Pandas 表。 我想刪除/更新現有顯示的 Pandas 表。
這怎么可能?
這種方法似乎適用於 matplotlibs,但不適用於 pandas 漂亮的表格。
您可以使用clear_output
並display
dataframe:
from IPython.display import display, clear_output
# this is just to simulate the delay
import time
i = 1
while i<10:
time.sleep(1)
df = pd.DataFrame(np.random.rand(4,3))
clear_output(wait=True)
display(df)
i += 1
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.