command로 Ipython noteobk Clear Output 하기

2020. 7. 15. 20:30꿀팁 분석 환경 설정/Jupyter Notebook & Lab

728x90

jupyter notebook에 너무 뭔가를 많이 프린트 해놓으면, html에서 다 읽느라고 너무 느려진다. 

이런 경우에 노트북 clear output 하는 방법을 공유한다.

 

# 새로 만들기
jupyter nbconvert --ClearOutputPreprocessor.enabled=True \
  --to notebook --output=Clean_jupyter Dirty_jupyter.ipynb

# 덮어쓰기
jupyter nbconvert --ClearOutputPreprocessor.enabled=True --inplace Dirty_Jupyter.ipynb

 

 

 

 

https://stackoverflow.com/questions/28908319/how-to-clear-an-ipython-notebooks-output-in-all-cells-from-the-linux-terminal

 

How to clear an IPython Notebook's output in all cells from the Linux terminal?

I have a problem when the output from a notebook is really long and it's saved into the notebook, any time I want to open this particular notebook again the browser crashes and can't display correc...

stackoverflow.com

 

728x90