pandas bar
-
[ Python ] pandas를 이용한 bar graph (stacked)Python/Python For Analytics 2022. 3. 1. 12:33
1. 기본 bar 그래프 그리기 import pandas as pd month = [ 'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec' ] data = { "Banana":[52, 83, 82, 53, 99, 94, 83, 74, 87, 70, 63, 74], "Orange":[99, 71, 77, 57, 87, 50, 59, 58, 63, 76, 51, 88], "mango":[50, 71, 93, 82, 70, 58, 55, 97, 76, 52, 97, 83], } df = pd.DataFrame(data,index=month) df.plot(kind="bar",figsize=(15,10)) 2. 스택그래프를 그리려면, s..