Á¤¼ºÈÆ
    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] Á¶È¸ : 326 ´Ù¿î : 0   
 
¡â ÀÌÀü±Ûcode_12_15_1.py (±³Àç)
¡ä ´ÙÀ½±Ûlab_12_2_test.py (±³Àç)
Python for AI ½Ç½À°Ô½ÃÆÇ
¹øÈ£ ¨Ï Á¦ ¸ñ Á¶È¸ µî·ÏÀÏ
lAnaconda3 ¼³Ä¡
lColabTurtlePlus
l½Ç½À ¸ñ·Ï
lColab ½Ç½À
l½Ç½À ½Ã ÇлýµéÀÌ ÀÚÁÖÇÏ´Â ½Ç¼ö ¿¹µé
341    ¦¦❷ lcode_12_23_3.py (±³Àç) 446 02-21
340    ¦¦❷ lcode_12_23_2.py (±³Àç) 364 02-21
339    ¦¦❷ lcode_12_23_1.py (±³Àç) 342 02-21
338 ¦¦❶ llab_12_5.py (±³Àç) 418 02-21
337 ¦¦❶ lcode_12_22.py (±³Àç) 334 02-21
336 ¦¦❶ lcode_12_21.py (±³Àç) 371 02-21
335 ¦¦❶ llab_12_4.py (±³Àç) 333 02-21
334 ¦¦❶ lcode_12_20.py (±³Àç) 344 02-21
333 ¦¦❶ lcode_12_19.py (±³Àç) 323 02-21
332 ¦¦❶ lcode_12_18.py (±³Àç) 323 02-21
331    ¦¦❷ lcode_12_18_2.py (±³Àç) 397 02-21
330    ¦¦❷ lcode_12_18_1.py (±³Àç) 311 02-21
329 ¦¦❶ lcode_12_17.py (±³Àç) 399 02-21
328 ¦¦❶ llab_12_3.py (±³Àç) 319 02-21
327 ¦¦❶ lcode_12_15.py (±³Àç) 306 02-21
326    ¦¦❷ lcode_12_15_2.py (±³Àç) 293 02-21
325    ¦¦❷ lcode_12_15_1.py (±³Àç) 331 02-21
324 ¦¦❶ llab_12_2.py (±³Àç) 326 02-21
323    ¦¦❷ llab_12_2_test.py (±³Àç) 347 02-21
322 ¦¦❶ lcode_12_13.py (±³Àç) 420 02-21

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