Á¤¼ºÈÆ
    lab_12_2.py (±³Àç)
  http://itsys.hansung.ac.kr/cgi-bin/onlineTest/viewpy4AI/onlinePy4AI.cgi?source=src/py/Ch12/lab_12_2.py



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#
# µû¶óÇϸ砹è¿ì´Â ÆÄÀ̽ã°ú µ¥ÀÌÅÍ°úÇÐ(»ý´ÉÃâÆÇ»ç 2020)
# LAB 12-2 ÆÇ´Ù½º·Î ¿ï¸ªµµÀÇ ¹Ù¶÷ ¼¼±â ºÐ¼®Çϱâ, 322ÂÊ
#
import pandas as pd
import matplotlib.pyplot as plt
 
weather = pd.read_csv('d:/data/weather.csv', encoding='CP949')
monthly = [ None for x in range(12) ]    # ´Þº°·Î ±¸ºÐµÈ 12°³ÀÇ µ¥ÀÌÅÍÇÁ·¹ÀÓ
monthly_wind = [ 0 for x in range(12) ]  # °¢ ´ÞÀÇ Æò±Õ Ç³¼ÓÀ» ´ãÀ» ¸®½ºÆ®
# ¸¶Áö¸·¿¡ ÇØ´ç ÇàÀÇ µ¥ÀÌÅÍ°¡ ÃøÁ¤µÈ ´ÞÀ» ±â·ÏÇÑ ¿­À» Ãß°¡
weather['month'= pd.DatetimeIndex(weather['ÀϽÃ']).month
 
for i in range(12) :
    monthly[i] = weather[ weather['month'== i + 1 ] # ´Þº°·Î ºÐ¸®
    monthly_wind[i] = monthly[i].mean()['Æò±Õdz¼Ó']    # °³º° µ¥ÀÌÅÍ ºÐ¼®
    
plt.plot(monthly_wind, 'red')
plt.show()
cs

  µî·ÏÀÏ : 2022-02-21 [16:19] Á¶È¸ : 268 ´Ù¿î : 0   
 
¡â ÀÌÀü±Ûcode_12_15_1.py (±³Àç)
¡ä ´ÙÀ½±Ûlab_12_2_test.py (±³Àç)
Python for AI ½Ç½À°Ô½ÃÆÇ
¹øÈ£ ¨Ï Á¦ ¸ñ Á¶È¸ µî·ÏÀÏ
lAnaconda3 ¼³Ä¡
lColabTurtlePlus
l½Ç½À ¸ñ·Ï
lColab ½Ç½À
l½Ç½À ½Ã ÇлýµéÀÌ ÀÚÁÖÇÏ´Â ½Ç¼ö ¿¹µé
340    ¦¦❷ lcode_12_23_3.py (±³Àç) 363 02-21
339    ¦¦❷ lcode_12_23_2.py (±³Àç) 307 02-21
338    ¦¦❷ lcode_12_23_1.py (±³Àç) 289 02-21
337 ¦¦❶ llab_12_5.py (±³Àç) 269 02-21
336 ¦¦❶ lcode_12_22.py (±³Àç) 280 02-21
335 ¦¦❶ lcode_12_21.py (±³Àç) 311 02-21
334 ¦¦❶ llab_12_4.py (±³Àç) 293 02-21
333 ¦¦❶ lcode_12_20.py (±³Àç) 284 02-21
332 ¦¦❶ lcode_12_19.py (±³Àç) 267 02-21
331 ¦¦❶ lcode_12_18.py (±³Àç) 275 02-21
330    ¦¦❷ lcode_12_18_2.py (±³Àç) 324 02-21
329    ¦¦❷ lcode_12_18_1.py (±³Àç) 262 02-21
328 ¦¦❶ lcode_12_17.py (±³Àç) 328 02-21
327 ¦¦❶ llab_12_3.py (±³Àç) 266 02-21
326 ¦¦❶ lcode_12_15.py (±³Àç) 257 02-21
325    ¦¦❷ lcode_12_15_2.py (±³Àç) 252 02-21
324    ¦¦❷ lcode_12_15_1.py (±³Àç) 279 02-21
323 ¦¦❶ llab_12_2.py (±³Àç) 268 02-21
322    ¦¦❷ llab_12_2_test.py (±³Àç) 286 02-21
321 ¦¦❶ lcode_12_13.py (±³Àç) 352 02-21

[1][2][3][4][5][6][7][8][9][10]-[Next][19]