title: "group_by" to csv format in pandas
body: <p>Here is my CSV :-</p>
  
  <p><a href="https://i.stack.imgur.com/PdUn9.png" rel="nofollow noreferrer">csv</a></p>
  
  <p>But when I am trying to convert this df to csv format by using <code>g.to_csv('path_to_csv')</code> It show's me like this :-</p>
  
  <pre><code>S_Name      Fruit
  
    A         Apple
    A         Apple
    A         Apple
    B         Banana
    B         Banana
    C         Chiku
  </code></pre>
  
  <p>I want Actual Output in <strong>csv</strong> like this:- </p>
  
  <pre><code>S_Name      Fruit
  
    A         Apple
              Apple
              Apple
    B         Banana
              Banana
    C         Chiku
  </code></pre>
  
  <p>Can anyone help me in this , where is my mistake ?</p>
  
  <p>Thank You !</p>