Jupyter NotebookCellCommand mode셀 자체에 영향, 셀을 추가, 삭제, 이동, ...셀 바깥쪽 클릭, ESC 누르기a(bove) : 현재 셀 위에 셀 추가b(elow) : 현재 셀 아래에 셀 추가x : 현재 셀 자르기, 삭제 대응으로 사용 가능Edit mode셀 안에다가 무언가 입력(에디트)shift + enter : 현재 셀 실행셀 단위로 실행맨 마지막 줄 코드의 결과는 자동으로 출력해 줌.Markdown : 문서 작업 가능(#으로 대, 소제목 구분)주피터 노트북에서 [View] - [Table of contents]를 통해 전체 항목을 확인 가능vscode에서 노트 목록 확인 시 왼쪽 하단에 OUTLINE을 활성화하여 확인 가능파이썬 기본 문법변수데이터에 이름을 만들어 주고 재..
대량의 업데이트 파일을 일정한 파일 크기로 배포 일정을 수립하기 위한 코드 작성import pandas as pd # 판다스 importregion = input('지역 입력 : ')file_name = input('파일을 입력하세요 : ')file_path = input('파일 경로 : ') + '\\' + region +'\\'df = pd.read_csv(file_path+file_name, sep='\t')# int(df.shape[0])df['분할'] = 'null' # object형df['분할_int'] = 'null' # int형# Initialize the week counterweek = 1# Initialize the cumulative sumcumulative_sum = 0# Iter..
작성 이유배포 전 압축 파일에 빈폴더가 있는지 확인하는 자동화 Tool 개발 시, zipfile 모듈을 사용했을 때 빈폴더를 파일로 압축해제하는 현상이 발생하여 원인 분석 후 해결 과정을 적재 1. 반디집(Bandizip)과 Python zipfile 모듈의 차이Python zip file1. 사용성 및 기능: Python의 zipfile 모듈은 파이썬 코드 내에서 직접 zip 파일을 생성하고, 읽고, 쓰고, 해제할 수 있는 기능을 제공합니다. 이는 프로그램 내에서 자동화된 작업이나 스크립트 작성을 용이하게 합니다.2. 프로그램 통합: 파이썬 코드 내에서 다른 데이터 처리 작업과 쉽게 통합될 수 있습니다.3. 제어와 유연성: 파일 압축 해제 과정에서 특정 파일을 선택적으로 해제하거나, 압축 해제된 파일을..
Streamlit데이터 사이언티스트도 분석 모델의 UI(사용자인터페이스)를 쉽게 구성할 수 있도록 python에서 제공하는 app library입니다https://streamlit.io/ Streamlit • A faster way to build and share data appsStreamlit is an open-source Python framework for machine learning and data science teams. Create interactive data apps in minutes.streamlit.io 1. 가상환경 생성conda create -n '가상환경명' python=='파이썬버전' 가상환경 활성화conda activate '가상환경명' 2. streamlit 설치p..
Chromdriver를 사용하도록 설정하기 if getattr(sys, 'frozen', False) and hasattr(sys, "_MEIPASS"): driver_path = os.path.join(sys._MEIPASS, "chromedriver.exe") driver = webdriver.Chrome() # print('running in a Pyinstaller bundle') else: driver = webdriver.Chrome() # print('running in a normal Python process') pyinstaller로 실행파일 생성 pyinstaller -w -F "파이썬 소스코드 경로"
라이브러리 설치 # pip install opencv-python # pip install tensorflow-datasets==4.6.0 # 'cats_vs_dogs'는 tfds 버전 4.6.0 에서 실행됨 # tfds 최신 버전 에러 해결 # pip install tfds-nightly import cv2 import matplotlib.pyplot as plt import tensorflow_datasets as tfds import tensorflow as tf 오류 발생시 # URL 변경 오류 시 다시 세팅 setattr(tfds.image_classification.cats_vs_dogs, '_URL',"https://download.microsoft.com/download/3/E/1/3E1C..