If Jupyter Notebook Reset Restore
If Jupyter Notebook Reset Restore
If Jupyter Notebook Reset Restore
- 오늘 주피터 노트북의 모든 내용이 다 날아갔고, Undo 역시 먹히지 않는 상황이 발생함
- 이 때 노트북 kernel은 종료되지 않았기 때문에, 다음과 같은 방법 사용
_ih
는 과거에 입력된 명령어를 리스트로 담고 있음- 100은 예시이고, 실행된 명령어가 더 많다면, 더 큰 숫자를 입력하면 됨
- 이 방법으로는 실행되지 않은 내용은 복구 불가함
for i in _ih[-100:]:
print(i)
References
- https://tokensquant.medium.com/jupyter-lab-and-notebook-history-callback-quick-tip-9e09ece2f25d
- https://softhints.com/6-ways-recover-deleted-jupyter-notebook-including-jupyterlab/