날씨 (2) 썸네일형 리스트형 Python - 한국기상청 도시별 현재 날씨 Data 분석 시각화 1. Import Moduleimport pandas as pd from print_df import print_df import matplotlib.pyplot as plt 2. Sample Data : https://developer-ankiwoong.tistory.com/259 3. Codeimport pandas as pd from print_df import print_df import matplotlib.pyplot as plt df = pd.read_csv('weather.csv', encoding='utf=8') df_list = list(df['지역']) index_dict = {} for i, v in enumerate(df_list): index_dict[i] = v df.drop('.. Python - 한국기상청 도시별 현재 날씨 정보 분석 후 csv 저장 1. import moduleimport requests from bs4 import BeautifulSoup as BS 2. Sample URL : http://www.weather.go.kr/weather/observation/currentweather.jsp 3. HTML Parsing Codeimport requests from bs4 import BeautifulSoup as BS url = 'http://www.weather.go.kr/weather/observation/currentweather.jsp' response = requests.get(url) if response.status_code != 200: print("%d 에러가 발생했습니다." % response.status_code.. 이전 1 다음