How to clear the output in Jupyter?

In Jupyter, you can use the %%bash magic command to clear the output of a cell. The specific steps are as follows:

  1. Locate the code cell in Jupyter Notebook that contains the results to be cleared.
  2. Run the following command in bash.
  3. transparent
  4. Running the code cell will clear the output.

There is an example below:

%%bash
clear

After running this code cell, all previous run results will be cleared.

Leave a Reply 0

Your email address will not be published. Required fields are marked *


广告
Closing in 10 seconds
bannerAds