인프런 - 강의/청와대 청원 데이터 시각화

10 - 실제 데이터 가공하기

개복치 개발자 2020. 3. 2. 04:39

# 엑셀을 읽기 위한 준비과정들
from openpyxl import load_workbook

read_wb = load_workbook("./blusehouse.xlsx")
read_ws = read_wb.active

list_excel = []

for i in range(1,151) :
    print(read_ws.cell(i,1).value.strip())
    list_excel.append(str(read_ws.cell(i,1).value.strip()))

print(list_excel)


from konlpy.tag import Kkma
import collections
kkma = Kkma()



list_temp = []

for row in list_excel :
    list_temp = kkma.nouns(row) + list_temp
    
print(list_temp)


a = "가"
b = "가나"
len(a)
len(b)

list_result = []
for check in list_temp :
    if len(check) > 1 :
        print(check)
        list_result.append(check)
        
        
list_result


collections.Counter(list_result)

collections.Counter(list_result).most_common(20)