title: remove duplicate rows based on specific criteria with pandas
body: <p>I have the dataframe below:</p>
  <pre><code>   Id   Name    Sales   Rent    Rate
  40808   A2      0       43      340
  17486   DV      491     0       346
  17486   D       0       0       0
  27977   AM      0       0       0
  27977   A-M     0       0       94
  80210   O-9     0       0       0
  80210   M-1     0       0       -37
  15545   M-2     0       0       -17
  15545   O-8     0       0       0
  53549   A-M7    0       0       0
  53549   A-M8    0       0       50
  40808   A       0       0       0
  66666   MK      0       0       0
      
  </code></pre>
  <p>I want to <strong>remove duplicate rows</strong> based on <strong>Id values</strong>(<em>exp 40808</em>) and to keep only the row that <strong>don't have 0</strong> value in all the fields.
  I used the suggestion from the answer:</p>
  <pre><code>df['zero']=df.select_dtypes(['int','float']).eq(0).sum(axis=1)
  df=df.sort_values(['zero','Id']).drop_duplicates(subset=['Id']).drop(columns='zero')
  </code></pre>
  <p><strong>The output i got</strong></p>
  <pre><code>      Id  Name  Sales  Rent     Rate
    40808    A2      0     43      340
    53549  A-M7      0      0        0
    27977    AM      0      0        0
    17486     D      0      0        0
    80210   M-1      0      0       -37
    15545   M-2      0      0       -17
     66666   MK       0      0        0
  </code></pre>
  <p><strong>Expected output:</strong></p>
  <pre><code>Id      Name    Sales   Rent    Rate
  40808   A2      0       43      340
  17486   DV      491     0       346
  27977   A-M     0       0       94
  80210   M-1     0       0       -37
  15545   M-2     0       0       -17
  53549   A-M8    0       0       50
  66666   MK      0       0        0
  </code></pre>