
Python_ml_pandas 04 시각화
2022. 6. 22. 23:00
TIL/02_Pandas 실전
4. 시각화 도구 1) Matplotlib - 기본 그래프 도구 1-1 선 그래프 기본 사용법 matplotlib.pyplot as plt df.fillna(method='ffill') 누락 데이터가 들어 있는 행의 바로 앞에 위치한 행의 데이터 값으로 채움 plt.plot(x축, y축) plt.plot(시리즈 or 데이터프레임 객체) df = df.fillna(method='ffill') # 서울에서 다른 지역으로 이동한 데이터만 추출 condition = (df['전출지별'] == '서울특별시') & (df['전입지별'] != '서울특별시') df_seoul = df[condition] df_seoul.drop(['전출지별'], axis=1) df_seoul.rename({'전입지별':'전입지'}, ..