본문 바로가기
반응형
[Jupyter] TypeError : 'stacklevel' 오류가 발생한 경위 과거 Jupyter notebook 확장 플러그인 중 nbtextensions를 설치하다가 갑자기 jupyter notebook이 먹통이 되어버린 적이 있었다. 이때 Jupyter notebook을 삭제하고 재실행해봐도 여전히 오류가 발생했었는데 이를 해결하게 되어서 관련 솔루션을 공유하고자한다. nbextensions 설치 후 발생한 오류 해결 Traceback (most recent call last): ... ModuleNotFoundError: No module named 'jupyter_server.contents' Traceback (most recent call last): ... TypeError: warn() missing 1 required keyword-only a.. 2023. 11. 7.
[matplotlib] %matplotlib inline 을 사용하는 이유 %matplotlib inline # Data manipulation import pandas as pd import numpy as np # Visualization import matplotlib.pyplot as plt import seaborn as sns # Set a few plotting defaults %matplotlib inline 개념 정리 해당 매직명령어를 실행 시 Ipython 내부 커널에 cell 을 run할 시에 matplotlib으로 만들어진 객체도 출력할 수 있게 만들어준다. 즉 matplotlib.pyplot.show() 메서드를 사용하지 않고도 바로 출력할 수 있게 도와주는 용도이다. 그러나 %matplotlib inline을 사용하지 않더라도 Jupyter는 Matpl.. 2023. 4. 6.
[json ↔ ipynb] 파일이 이상하게 저장되어 있을 때 Github나 Slack에서 파일이 이렇게 보일 때가 있다. { "cells": [ { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "## Basic Plotting" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "import matplotlib.pyplot as plt\n", "%matplotlib inline" ] }, { ………(중략) 해결방법 : 만약 위 문제처럼 본인이 blob인 json형태만 가지고 있다면 vscode상에서 (.json )파일을 생성 후, 해당 코드를 옮겨서 작성해주고 저장한.. 2023. 4. 2.
[Jupyter] Shell Command ( + 편리 ) 설명 우리가 Windows 환경에서 CMD를 사용할 때, 사용하는 Command를 Jupyter notebook에서도 사용할 수 있다. Shell 단에서 사용하는 명령어를 실행하면 편리하다. 예) pip, conda etc. 방법 사용방법은 간단하다. Shell Command 앞에 "!" 를 붙이면 된다. 인스타 주소 🎗 https://www.instagram.com/f.inn_sharp/ 2022. 10. 6.
반응형