deda
Deda의 데이터 디자인
deda
전체 방문자
오늘
어제
  • 분류 전체보기 (121)
    • Python (27)
      • Python 기초 (17)
      • Python 데이터분석 (10)
    • SQL (9)
    • Coding test (54)
      • Python 기초문제 (45)
      • LeetCode (9)
    • BigData (2)
    • ZeroBase (3)
    • UX (0)
    • Business Review (1)
    • 통계 & 수학 (17)
      • 통계학 (14)
      • 수학 (3)
    • 스터디 (6)

블로그 메뉴

  • 홈
  • 태그
  • 방명록

공지사항

인기 글

태그

  • 계산기
  • 함수
  • 등차수열
  • 모듈
  • 데이터분석가
  • 제로베이스
  • 코딩
  • 통계
  • 빅데이터
  • 데이터사이언티스트
  • 부트캠프
  • 미니콘다
  • 프로그래밍
  • 마이데이터
  • 계차수열
  • 소인수분해
  • SQL
  • matplotlib
  • 최소공배수
  • 파이썬
  • 팩토리얼
  • 기초수학
  • 네카라쿠배
  • BMI
  • 릿코드
  • 데이터분석
  • 군수열
  • 등비수열
  • 데이터엔지니어
  • pandas

최근 댓글

최근 글

티스토리

hELLO · Designed By 정상우.
deda

Deda의 데이터 디자인

[Pandas] 그래프 그리기(plot)
Python/Python 데이터분석

[Pandas] 그래프 그리기(plot)

2022. 5. 27. 01:43

1. plot

- DataFrame의 plot을 이용하면 다양한 그래프를 그릴 수 있음.

 

2. 그래프 그리기

 1) plot(x, y)

- kind : 그래프 종류  ex) line / bar / barh / hist / box / kde / density / area / pie / scatter / hexbin

- title : 그래프 제목

- linestyle : 선의 스타일 설정 ex)linestyle='dashed'

data_result["인구수"].plot(kind="bar", figsize=(10,10));

data_result["소계"].plot(kind="barh", grid=True, figsize=(10, 10));


 

3. 그래프 정렬하기

1) sort_values(ascending=True/False)

data_result["소계"].sort_values().plot(
    kind="barh", grid=True, title="가장 CCTV가 많은 구", figsize=(10, 10));

data_result["소계"].sort_values(ascending=False).plot(
    kind="barh", grid=True, title="가장 CCTV가 많은 구", figsize=(10, 10));


 

4. 참고할만한 사이트

 

20-01 plotting기초 (plot)

####DataFrame.plot(args, kwargs) ##개요 `plot` 메서드는 matplotlib 라이브러리를 이용해 dataframe 객체를 시각화 하는 메서드 ...

wikidocs.net

 

Plot types — Matplotlib 3.5.2 documentation

Overview of many common plotting commands in Matplotlib. Note that we have stripped all labels, but they are present by default. See the gallery for many more examples and the tutorials page for longer examples. Unstructured coordinates Sometimes we collec

matplotlib.org

 

'Python > Python 데이터분석' 카테고리의 다른 글

[Matplotlib] 데이터 시각화  (0) 2022.05.27
[Matplotlib] 산점도(Scatter Plot) 그리기  (0) 2022.05.27
[Matplotlib] Matplotlib 이란?  (0) 2022.05.26
[Pandas] 데이터 병합  (0) 2022.05.25
[Pandas] 함수 사용  (0) 2022.05.25
    'Python/Python 데이터분석' 카테고리의 다른 글
    • [Matplotlib] 데이터 시각화
    • [Matplotlib] 산점도(Scatter Plot) 그리기
    • [Matplotlib] Matplotlib 이란?
    • [Pandas] 데이터 병합
    deda
    deda
    데이터 분석 / 파이썬 / UX / 정량리서치

    티스토리툴바