Make ipython notebook print in real time

前端 未结 3 1984
终归单人心
终归单人心 2021-01-01 13:12

Ipython Notebook doesn\'t seem to print results in real time, but seems to buffer in a certain way and then bulk output the prints. How can I make ipython print my results a

3条回答
  •  自闭症患者
    2021-01-01 13:33

    Try this:

    from IPython.display import display, clear_output
    
    display("Hello World") # print string
    display(df) # print object such as dataframe
    
    clear_output(wait=True) # use this if need to clear the output before display, good for dynamic updates
    

提交回复
热议问题