3/21 ์
์์์ผ! ์ค๋์ Pandas์ DataFrame(DataFrame ์ฐ๊ฒฐ · ๊ฒฐํฉ, Mapping, Grouping)์ ๋ง๋ฌด๋ฆฌ ์ง๊ณ , ๋ด์ผ๋ถํฐ ๋ฐ์ดํฐ์ ์๊ฐํ์ ๋ํด ๋ฐฐ์ด๋ค. 1. DataFrame ์ฐ๊ฒฐ : pd.concat(). default๋ ํ ๋ฐฉํฅ์ผ๋ก ์ฐ๊ฒฐ. ์ปฌ๋ผ ๋ช
์ด ๊ฐ์ ๊ฒ๋ค์ด ์๋ก ๊ฒฐํฉ๋จ import numpy as np import pandas as pd df1 = pd.DataFrame({'a':['a0', 'a1', 'a2', 'a3'], 'b':[1, 2, 3, 4], 'c':['c0', 'c1', 'c2', 'c3']}, index=[0, 1, 2, 3]) display(df1) df2 = pd.DataFrame({'b':[5, 6, 7, 8], 'c':['c0', 'c1', 'c2'..
๋๋ณด๊ธฐ
3/16 ์
์์์ผ! ์ด์ ~์ค๋๊น์ง Numpy! ์ค๋ ์คํ~์ด๋ฒ ์ฃผ๊น์ง Pandas ์ง๋! Anaconda Prompt์์ Jupyter notebook ์คํ conda activate machine jupyter notebook 1. ํ๋ ฌ๊ณฑ ์ฐ์ฐ์ ์์ชฝ์ 2์ฐจ์ matrix ์ด๊ณผ ๋ค์ชฝ์ 2์ฐจ์ matrix ํ ๊ฐ์๊ฐ ๊ฐ์์ผ ํจ. (3, 2) * (2, 2) import numpy as np arr1 = np.array([[1,2,3], [4,5,6]]) # (2,3) arr2 = np.array([[4,5],[6,7],[8,9]]) # (3,2) print(np.matmul(arr1, arr2)) # matmul() ํจ์ ์ฌ์ฉํด์ ๊ณ์ฐ. ๊ฒฐ๊ณผ๋ (2,2) # [[ 40 46] # [ 94 109]] 2. ์ ์นํ๋ ฌ(..
๋๋ณด๊ธฐ