title: Consultation python in csv .20 major movements by department
body: <p>I need to get the 20 biggest 'MOV12' for 'DPTO', using python and pandas</p>
  
  <p>I have a csv (.del) with the following fields</p>
  
  <pre><code>"CODCLI" "DPTO" "SEG" "TIPPER"  "MOV12" 
  
  11 20 "SEG1" "NAT" 6480.00  
  19 20 "SEG1" "NAT" 0.00 
  28 20 "SEG1" "NAT" 900.00 
  29 24 "SEG4" "NAT" 1800.00 
  31 20 "SEG1" "NAT" 3050.00 
  38 20 "SEG1" "NAT" 0.00 
  39 20 "SEG1" "NAT" 0.00 
  </code></pre>
  
  <p>I have a csv with the following fields, considering that the 'DPTO' is a total of 12 and I have thousands of data</p>
  
  <p>for the moment and managed to obtain the moyor 'MOV12'</p>
  
  <pre><code>import pandas as pd
  
  df = pd.read_csv("c.del", sep = ' ') 
  result=df.loc[df[['MOV12']].idxmax().unique()].groupby('DPTO')
  print(result)
  </code></pre>
  
  <p>I hope you give me suggestions to find the solution, thanks</p>