Python(105)
-
[python] 심화
Ver. Jupyter Notebook (Anaconda3) ▶ 리스트 컴프리헨션(list comprehension) # 각각의 요소에 제곱을 할 경우 A = [1,2,3,4,5,6,7,8,9,10] B1 = [] for i in A: B1.append(i**2)# [1, 4, 9, 16, 25, 36, 49, 64, 81, 100] B2 = [x**2 for x in A]# [1, 4, 9, 16, 25, 36, 49, 64, 81, 100] B3 = [x**2 for x in range(1,11)]# [1, 4, 9, 16, 25, 36, 49, 64, 81, 100] ▶ input 함수 A = input('크롤링할 데이터는 무엇입니까? ') >>> 크롤링할 데이터는 무엇입니까? 대전 맛집 A# '대..
2021.04.27 -
[python] 기초
Ver. Jupyter Notebook (Anaconda3) ▶ 함수 len('abc') len('012') ▶ 메소드: 함수에 포함된 개념으로 문자열만 쓸 수 있는 함수. A.upper(abc) A.upper(012) # TypeError (대문자로 치환하는 .upper() 메소드에 숫자(int, float) 입력시 오류 발생) ▶ 작업 경로 pwd ▶ Markdown (제목) m : markdown(제목) y : code(코드) r : raw(메모) # Markdown ### Markdown ▶ 데이터 자료형 관련 ● 숫자형(int, float) 1+1 # 덧셈 2-2 # 뺄셈 4*2 # 곱셈 4/2 # 나눗셈 5//2 # 나눗셈 몫 5%2 # 나눗셈 나머지 2**3 # 거듭제곱 ● 문자열(strin..
2021.04.27 -
[Python] 주피터 노트북(Jupyter Notebook) 설치 및 단축키
▶ 설치 방법 1. 아나콘다 홈페이지 접속 www.anaconda.com/products/individual Anaconda | Individual Edition Anaconda's open-source Individual Edition is the easiest way to perform Python/R data science and machine learning on a single machine. www.anaconda.com 2. 하단 인스톨 클릭 (윈도우 체재, 버전에 맞게) 3. 설치 - Install for : All Users - Check : Add Anaconda3 to the system PATH environment variable ▶ 단축키 Enter : 에디트 모드로 변경 Esc..
2021.04.26