Dev/인공지능
2020. 4. 13.
[넘파이, 판다스] 예제 연습 by Spyder
1-1. 넘파이 import numpy as np #1 a = np.arange(6) #2 a2 = a[np.newaxis, :] #3 a2.shape #4 a = np.array([1, 2, 3, 4, 5, 6]) #5 print(a[0]) #6 a = np.arange(6) b = a.reshape(3, 2) #7 c = np.expand_dims(a, axis=0) #8 data = np.array([1, 2, 3]) data[-2:] #9 a = np.array([[1 , 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]) print(a[a < 5]) #10 a1 = np.array([[1, 1],[2, 2]]) a2 = np.array([[3, 3],[4, 4]]) np...