수업정리/python (3) 썸네일형 리스트형 matplotlib 정리 https://colab.research.google.com/drive/1GncjNn6uf_gyWAHKvTExIITX2KxdP2v4#scrollTo=tLjHLMgSGGn3 matplotlib.ipynb Colaboratory notebook colab.research.google.com 1. matplotlib 임포트 import matplotlib.pyplot as plt 2. 그래프 그리기 1) plot - 선 그래프 (x축 지정X) 기본적으로 배열 인덱스가 x축이 됨 [0,1,2] y = [2,4,6] plt.plot(y) plt.show() 2) x축 지정O y = [2,4,6] x = [1,2,3] # 갯수 서로 딱 맞아야 오류 안남 plt.plot(x,y) plt.show() 3. linest.. pandas 정리 https://colab.research.google.com/drive/11Ji6e5ymscQ_qdgSW94qNhGGFSErTWVF Pandas.ipynb Colaboratory notebook colab.research.google.com 1. pandas 개요 2. pandas 모듈 사용하기 import pandas as pd 3. Series 사용, 기본적인 생성 방법 - 시리즈 생성하기 s1 = pd.Series([4,7,-5,3]) s1 - 인덱스 지정하여 생성 s1 = pd.Series([4,7,-5,3], index=['d','b','a','c']) s1 - 딕셔너리 객체로 Series 생성 dic1 = {'a':4, 'b':7, 'c':-5, 'd':3} s3 = pd.Series(dic1.. numpy 정리 https://colab.research.google.com/drive/1c_IPOmIsRW_M0TR8iBB1syYubZPOaGnk#scrollTo=y4pP-V9s6oyx Google Colaboratory Notebook Run, share, and edit Python notebooks colab.research.google.com 1. numpy 불러오기 import numpy as np 2. list => numpy arr = np.array(list)로 numpy array 생성 가능 list1 = [1,2,3,4,5] arr = np.array(list1) print(arr) # [1 2 3 4 5] list2 = [[1,2,3], [4,5,6]] arr2 = np.array(list2) pr.. 이전 1 다음