
1. 환경 설정
- PyCharm IDE를 이용해서 개발
- 여러명이 같은 파일, 같은 프로젝트를 공유하면서 개발할때 유리
- interactive한 개발은 힘들어요
- 데이터분석작업 보다는 Web 개발이나 다른 appication작성에 이용
- Jupyter Note book
- Interactive한 개발이 가능해서 데이터분석에 대한 학습이나 실제 분석작업을 많이 해요
- 여러명이 공동작업할 때는 불편
2. Jupyter notebook 사용방법
- cell 생성, cell 안의 코드 실행 방법
- cell 삭제
- 무한루프가 되면 실행 interrupt 방법으로 멈춰줌
- 기본적인 tool 사용법
3. python built-in types
- Numeric(int, float, complex) numeric이라고 부르는게 아니라 이렇게 묶어준것
- Text Sequence Type ( str ) => 약간 길게 설명
- Sequence Type ( list, tuple, range ) : 자료구조 타입
- Mapping Type ( dict ) : 키와 벨류의 쌍으로 이루어진 구조
- Bool Type ( bool ) : 논리타입
True, False 가지는 타입
= and 연산자 : 논리연산자, or : 논리연산자, not : 논리연산자
result = True and False
print(result)
result = not True
print(result)
## = & : 비교연산자, bitwise연산
result = True & False

- set type
pyton에서 숫자 0은 False로 간주, 0이 아닌 모든 숫자 True로 간주
print(bool(0))
## 숫자 0을 True나 False로 바꿔라
print(bool(1))
## python 에서 False는 숫자 0으로 변환
print(int(False))
## Treu를 숫자로 바꾸면
print(int(True))
- 10진수 5를 2진수 => 0101
10진수 1을 2진수 => 0001 - True & False => 1 & 0 => 0001 & 0000 => 0000 => 0 => False
python은 다음이 경우를 False로 간주
- 숫자0, 빈 문자열(''), 빈 리스트([]), 빈 튜플( () ), 비어있는 idc( {} ), None
print(bool("소리없는 아우성!!"))
print(bool([1]))
print(bool({tuple}))
print(bool(None))

'Python > Introduction' 카테고리의 다른 글
Introduction (0) | 2019.11.25 |
---|---|
Python 설치 (0) | 2019.11.25 |
댓글