title: how to plot a pie chart?
body: <p>I have data like:</p>
  
  <blockquote>
    <p>Machine_id    Cycling   Idle<br>
    81091001    41000000000 19000000000<br>
    81091001    40000000000 19000000000<br>
    81091001    41000000000 19000000000<br>
    81091001    41000000000 20000000000<br>
    81091001    41000000000 19000000000</p>
  </blockquote>
  
  <p>Code for plotting Pie chart :  </p>
  
  <pre><code>import pandas as pd
  import matplotlib.pyplot as plt
  import seaborn as sns
  sns.set(palette='Paired')
  
  df = pd.read_csv('sample1.csv')
  
  df = df.set_index('Machine_id')
  
  for ind in df.index:
       fig, ax = plt.subplots(1,1)
       fig.set_size_inches(5,5)
       df.iloc[ind].plot(kind='pie', ax=ax, autopct='%1.1f%%')
       ax.set_ylabel('')
       ax.set_xlabel('')
  </code></pre>
  
  <p>I am getting a error here like: </p>
  
  <p><code>IndexError: single positional indexer is out-of-bounds</code></p>
  
  <p>Then how a pie chart can be formed for  <code>Cycling</code> v/s <code>Idle</code> in pandas each <code>Machine_id</code> wise ?</p>