title: Python Group by and Sum with a Blank space
body: <p><a href="https://i.stack.imgur.com/49gQm.png" rel="nofollow noreferrer">Revenue by Segment and Country</a></p>
  
  <p>I have a dataframe with Revenue by Segment and by Country. I want to get the Total Revenue by Country code. So I want the output to be: </p>
  
  <pre><code>Country  Revenue    
  FR      26.38      
  AE      12.02
  </code></pre>
  
  <p>This is what the data frame looks like now: </p>
  
  <pre><code>Country      Segment         Revenue    
  FR           
           Digital Games        $2.40
           Music                $20.79
           Health and Fitness   $0.46
           Tech Enthusiasts     $2.73
  AE     
           Digital Games        $9.99
           Games and Toys       $2.03
  AT     
           Entertainment-Music  $0.09
  AU
           Shopping             $52.45
           Auto Enthusiasts     $7.86
           Auto Owners          $25.92
           Culture and Arts     $8.04
           Higher Education     $25.81
           Digital Games        $2.60
           Games and Toys       $6.12
  </code></pre>