튜플과 리스트
파이썬에는 두 가지 다른 시퀀스 구조가 있다.튜플과 리스트이다.문자열과는 달리, 이들의 항목은 다른 타입이 될 수 있다. 다시 말해 어떤 객체도 될 수 있다. 튜플은 immutable하고 리스트는 mutable하다는 것이 가장 큰 특징이다. 튜플튜플 생성하기empty_tuple=()one_marx='Grey',one_marx=('Grey',) #콤마를 생략하면 문자열이 된다.marx_tuple='Grey','Red','Blue' #원소가 여러개일때는 콤마를 붙이지 않는다.marx_tuple=('Grey','Red','Blue')튜플 언패킹marx_tuple='Grey','Red','Blue'a,b,c=marx_tuplea #'Grey'b #'Red'c #'Blue'marx_list=['Grey','Red..
Pandas 모듈
Create a DataFrame딕셔너리 사용df1 = pd.DataFrame({ 'name': ['John Smith', 'Jane Doe', 'Joe Schmo'], 'address': ['123 Main St.', '456 Maple Ave.', '789 Broadway'], 'age': [34, 28, 51]})딕셔너리는 순서가 없기 때문에 알파벳 순으로 정렬된다. 리스트 사용df2 = pd.DataFrame([ ['John Smith', '123 Main St.', 34], ['Jane Doe', '456 Maple Ave.', 28], ['Joe Schmo', '789 Broadway', 51] ], columns=['name', 'address', ..