๐Ÿ‘ฉ‍๐Ÿ’ป ์•Œ๊ณ ๋ฆฌ์ฆ˜/๐Ÿข PYTHON

๋ฐฐ์—ด์„ numpy๋กœ ๋ณ€ํ™˜

์˜ค๋ธŒ ๐Ÿง™‍โ™‚๏ธ 2023. 9. 19. 20:34
import numpy as np

revenue_in_yen = [
    300000, 340000, 320000, 360000, 
    440000, 140000, 180000, 340000, 
    330000, 290000, 280000, 380000, 
    170000, 140000, 230000, 390000, 
    400000, 350000, 380000, 150000, 
    110000, 240000, 380000, 380000, 
    340000, 420000, 150000, 130000, 
    360000, 320000, 250000
]

#๋ฐฐ์—ด์„ numpy ๋ฐฐ์—ด๋กœ ๋ณ€ํ™˜
np.array(revenue_in_yen)

#์—”ํ™”๋ฅผ ์›ํ™”๋กœ ๋ณ€ํ™˜
won_array = np.array(revenue_in_yen) * float(10.08)

won_array