title: How to plot pandas groupby values in a graph
body: <p>I have a csv file which contains Gender and Marriage status along with few more columns like below.</p>
  <pre><code>Loan_ID,Gender,Married,Dependents,Education,Self_Employed,ApplicantIncome,CoapplicantIncome,LoanAmount,Loan_Amount_Term,Credit_History,Property_Area,Loan_Status
  LP001002,Male,No,0,Graduate,No,5849,0,,360,1,Urban,Y
  LP001003,Male,Yes,1,Graduate,No,4583,1508,128,360,1,Rural,N
  LP001005,Male,Yes,0,Graduate,Yes,3000,0,66,360,1,Urban,Y
  LP001006,Male,Yes,0,Not Graduate,No,2583,2358,120,360,1,Urban,Y
  LP001008,Male,No,0,Graduate,No,6000,0,141,360,1,Urban,Y
  LP001011,Male,Yes,2,Graduate,Yes,5417,4196,267,360,1,Urban,Y
  </code></pre>
  <p>I want to count no. of married Males and Females and show the same in graph as shown below</p>
  <p>Below is the code I am using :</p>
  <pre><code>import csv
  import pandas as pd
  import numpy as np
  import matplotlib.pyplot as plt
  
  if __name__ == '__main__':
      x=[]
      y=[]
      df = pd.read_csv(
          &quot;/home/train.csv&quot;,usecols=[1,2]).dropna(subset=['Gender','Married'])  # Reading the dataset in a dataframe using Pandas
      groups = df.groupby(['Gender','Married'])['Married'].apply(lambda x: x.count())
      print(groups)
  </code></pre>
  <p>After group by I have following result :</p>
  <pre><code>Gender  Married
  Female  No          80
          Yes         31
  Male    No         130
          Yes        357
  </code></pre>
  <p>I want the following chart</p>
  <p><a href="https://i.stack.imgur.com/2O2Sw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2O2Sw.png" alt="enter image description here" /></a></p>