이슈 

- pandas 모듈로 엑셀파일 로드시 하기 에러발생시

import pandas as pd

raw_data = pd.read_excel('./data/teenage_mental.xls')
ImportError                               Traceback (most recent call last)
<ipython-input-4-7fe267b63e94> in <module>()
      1 import pandas as pd
      2 
----> 3 raw_data = pd.read_excel('./data/teenage_mental.xls')

4 frames
/usr/local/lib/python3.7/dist-packages/pandas/compat/_optional.py in import_optional_dependency(name, extra, errors, min_version)
    139                 return None
    140             elif errors == "raise":
--> 141                 raise ImportError(msg)
    142 
    143     return module

ImportError: Pandas requires version '1.2.0' or newer of 'xlrd' (version '1.1.0' currently installed).

---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------

 

방법 

하기 명령 실행후 runtime 재시작 

!pip install --upgrade xlrd

 

'머신러닝' 카테고리의 다른 글

colab 그래프에서 한글설정  (0) 2022.05.11

Colab에서 한글이 깨져보이는 경우 

 

!apt-get update -qq
!apt-get install fonts-nanum* -qq
import matplotlib.pyplot as plt
%matplotlib inline 

import matplotlib as mpl

plt.rcParams['axes.unicode_minus'] = False 
path = '/usr/share/fonts/truetype/nanum/NanumGothicEco.ttf'
font_name = mpl.font_manager.FontProperties(fname=path).get_name()

mpl.rc('font', family=font_name)
mpl.font_manager._rebuild()
plt.plot([0,1], [0,1])
plt.title('한글 테스트')
plt.show()

 

'머신러닝' 카테고리의 다른 글

colab xlrd오류 대응  (0) 2022.05.11

+ Recent posts