주피터(20)
-
[crawler] youtube(selenium)
Ver. Jupyter Notebook (Anaconda3) ▶ crawler_yotube(selenium) 수집: 제목, 조회수, 날짜, 좋아요, 싫어요, 댓글 코딩: github JeongJaeyoung0/crawler Contribute to JeongJaeyoung0/crawler development by creating an account on GitHub. github.com 210517 # crawler_Youtube step 1. url 수집: 검색어 입력, 크롤링 글 개수 입력 step 2. 크롤링: 제목, 조회수, 날짜, 좋아요, 싫어요, 댓글 pwd ### step 0. 준비 import sys # 시스템 import os # 시스템 import pandas as pd # 판다스 :..
2021.05.17 -
[jupyter] 디렉토리 변경
Ver. Jupyter Notebook (Anaconda3) ▶ 디렉토리 변경 1. configure 파일 생성하기 cmd > jupyter notebook --generate-config 2. 생성된 파일 열기 C:\Users\컴퓨터명\.jupyter\jupyter_notebook_config.py 3. # 삭제, 디렉토리 경로 지정 # c.NotebookApp.notebook_dir = '' 를 아래와 같이 변경 c.NotebookApp.notebook_dir = 'G:\내 드라이브' 4. Jupyter Notebook 우클릭 > 파일 위치 열기 > Jupyter Notebook (Anaconda3) 우클릭 > 속성 [대상]의 "%USERPROFILE%/" 삭제 (4번까지 설정해도 안될 경우) 5. ..
2021.05.16 -
[python] crawler (소방청 국가화재정보센터)
Ver. Jupyter Notebook (Anaconda3) ▶ crawler_소방청 국가화재정보센터 수집: 화재 발생건수, 재산피해, 인명피해 부상, 인명피해 사망 코딩: github JeongJaeyoung0/crawler Contribute to JeongJaeyoung0/crawler development by creating an account on GitHub. github.com 2021.05.12 # crawler_소방청 국가화재정보센터 step 1. 소방청 > 시작 날짜 입력, 끝 날짜 입력, 지역 선택, 검색 클릭 > 크롤링 > 엑셀 저장 pwd ### step 0. 준비 import sys # 시스템 import os # 시스템 import pandas as pd # 판다스 : 데이터..
2021.05.09 -
[jupyter] 테마 변경
Ver. Jupyter Notebook (Anaconda3) ▶ 테마 변경 1. juptyerthemes 설치 cmd > pip install jupytertheme 2. 명령어 실행 - 테마 리스트 jt -l - 테마 변경 jt -t 테마이름 - 테마 초기화 jt -r
2021.05.08 -
[python] 평가 (정확도, 오차행렬, 정밀도, 재현율)
Ver. Jupyter Notebook (Anaconda3) ▶ 정확도 정확도 = 예측 결과가동일한 데이터 건수 / 전체 예측 데이터 건수 # 이진 분류 시 좋은 평가 지표는 아니다. # 예) 0~10 숫자 중 0일 경우를 맞추는 문제에서, 모든 답을 아니라고 하면 정확도는 90%가 됨 더보기 >>> from sklearn.datasets import load_digits # mnist 데이터셋 로드 >>> from sklearn.model_selection import train_test_split >>> from sklearn.base import BaseEstim >>> from sklearn.metrics import accuracy_score >>> import numpy as np >>> im..
2021.05.06 -
[Python] 데이터 전처리 (원-핫 인코딩, 표준화, 정규화)
Ver. Jupyter Notebook (Anaconda3) ▶ 판다스의 원핫 인코딩 - sklearn의 레이블 인코딩, 원-핫 인코딩 방식은 복잡함. # padas의 get_dummies 함수를 이용하면 쉽게 원핫 인코딩 가능 >>> df = pd.DataFrame({'item':['TV','냉장고','전자렌지','컴퓨터','선풍기','선풍기','믹서','믹서'] }) >>> df pd.get_dummies(df) ▶ 피처 스케일링과 정규화 from sklearn.datasets import load_iris import pandas as pd iris = load_iris() iris_data = iris.data iris_df = pd.DataFrame(data=iris_data, columns=i..
2021.05.05