Chapter 16. Numpy
Chapter 16. Numpy 1. Numpy ⦁ numpy는 대규모 다차원 배열을 쉽게 처리할 수 있도록 지원하는 파이썬의 라이브러리 ⦁ numpy 명령 프롬프트에서 설치하며, jupyter notebook 내에서는 pip 앞에 !를 붙여 설치 pip install numpy ⦁ numpy를 import하여 사용 가능하며 대부분 np로 사용하기 때문에 as로 사용이름 변경 import numpy as np 2. Numpy array ⦁ np.array(list)를 사용하면 numpy list가 됨 # numpy array a1 = np.array([1,2,3,4,5]) print([1,2,3,4,5]) print(a1) print(type(a1)) # 결과값 [1, 2, 3, 4, 5] [1 2 3 ..
2023. 3. 29.
Chapter 15. Requests
Chapter 15. Requests 1. Requests ⦁ requests를 import하여 사용 가능 ⦁ get함수를 사용하여 url을 통해 데이터를 가져옴 a. requests # requests import requests x = requests.get('https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data') print(x.text) # 결과값 5.1,3.5,1.4,0.2,Iris-setosa 4.9,3.0,1.4,0.2,Iris-setosa ...... 6.2,3.4,5.4,2.3,Iris-virginica 5.9,3.0,5.1,1.8,Iris-virginica 2. UCI Machine Learning Reposi..
2023. 3. 28.