트리맵
-
외국인 입국 통계 데이터 분석 With PythonData Analysis/Social Issues 2021. 4. 14. 21:22
1. 데이터 가져오기 국가 통계 포털에서 2018년부터 2020년까지 월별 국적, 목적별 입구 데이터를 가져와서 분석하도록 하겠다. 코드에 문제가 없다면 아래와 같은 데이터를 확인할 수 있을 것이다. import pandas as pd df=pd.read_csv('C:/Users/banad/Downloads/입국.csv',encoding='cp949') df.columns=['Continent','Country','Purpose','Month','Visitors'] df['Year']=df['Month'].apply(lambda x:x.split('. ')[0]) df['Purpose']=df['Purpose'].str.replace('관광','Tour').replace('상용','Business').r..
-
지난 10년간 대한민국 시도별 온도/강수량 데이터 분석 & 시각화 With PythonData Analysis/Environment 2021. 3. 9. 23:10
0. Data Source KOSIS국가데이터통계포털에서 지난 10년간 시도별 온도 및 강수량 데이터를 가져와서 분석과 시각화를 시도해보도록 하겠다. (세종시는 20년 데이터만 존재하므로 이번 분서에서는 제외하도록 하겠다.) import pandas as pd a=pd.read_csv('C:/Users/banad/Downloads/기온.csv',encoding='cp949') b=pd.read_csv('C:/Users/banad/Downloads/강수량.csv',encoding='cp949') df=pd.merge(left=a,right=b,how='inner',left_on=['행정구역별(1)','시점'],right_on=['행정구역별','시점']) df=df.drop(['행정구역별(1)'],axis=..