데이터 시각화

금융을 위한 중급 Python

Kennedy Behrman

Data Engineer, Author, Founder

데이터 살펴보기

주가 그래프

금융을 위한 중급 Python
exxon.head()
금융을 위한 중급 Python

데이터 소개

exxon.head()
    Date         High        Volume      Month
0   2015-05-01   90.089996   198924100   May
1   2015-06-01   85.970001   238808600   Jun
2   2015-07-01   83.529999   274029000   Jul
3   2015-08-01   79.290001   387523600   Aug
4   2015-09-01   75.470001   316644500   Sep

금융을 위한 중급 Python

Matplotlib

my_dataframe.plot()
금융을 위한 중급 Python

선 그래프

exxon.plot(x='Date', 
           y='High' )
금융을 위한 중급 Python

주가 선 그래프

금융을 위한 중급 Python

회전

exxon.plot(x='Date', 
           y='High', 
           rot=90 )
금융을 위한 중급 Python

회전된 레이블이 있는 선 그래프

금융을 위한 중급 Python

제목

exxon.plot(x='Date', 
           y='High', 
           rot=90, 
           title='Exxon Stock Price')
금융을 위한 중급 Python

제목이 있는 선 그래프

금융을 위한 중급 Python

인덱스

exxon.set_index('Date', inplace=True)
exxon.plot(y='High', 
           rot=90, 
           title='Exxon Stock Price')
금융을 위한 중급 Python

인덱스를 x축으로 사용한 선 그래프

금융을 위한 중급 Python

그래프 유형

  • line
  • bar
  • barh
  • hist
  • box
  • kde
  • density
  • area
  • pie
  • scatter
  • hexbin
금융을 위한 중급 Python

막대형

exxon2018.plot(x='Month', 
               y='Volume', 
               kind='bar', 
               title='Exxon 2018')
금융을 위한 중급 Python

막대 그래프

금융을 위한 중급 Python

히스토그램

exxon.plot(y='High',kind='hist')
금융을 위한 중급 Python

히스토그램

금융을 위한 중급 Python

연습해 봅시다!

금융을 위한 중급 Python

Preparing Video For Download...