title: Python Pandas Flag for min max Values
body: <p>I have a dataframe which looks like this:</p>
  <pre><code>import pandas as pd
  
      
  d = {'Para1': ['Para1_1', 'Para1_1', 'Para1_2', 'Para1_2'], 'Para2': ['Para2_1', 'Para2_1', 'Para2_2', 'Para2_2'], 'ParaN': ['ParaN_1', 'ParaN_1', 'ParaN_2', 'ParaN_2'],'value':[0.5,0.3,0.01,0.5]}
  
  df=pd.DataFrame(data=d)
  
  print (df)
  </code></pre>
  <p>output:</p>
  <pre><code>     Para1    Para2    ParaN  value
  0  Para1_1  Para2_1  ParaN_1   0.50
  1  Para1_1  Para2_1  ParaN_1   0.30
  2  Para1_2  Para2_2  ParaN_2   0.01
  3  Para1_2  Para2_2  ParaN_2   0.50
  </code></pre>
  <p>For each Combination of Para1 + Para2 + ParaN a have two values.
  I need a flag which is the max and which is the min value of the combination. So that it looks like this:</p>
  <pre><code>     Para1    Para2    ParaN  value   minmaxflag
  0  Para1_1  Para2_1  ParaN_1   0.50    max
  1  Para1_1  Para2_1  ParaN_1   0.30    min
  2  Para1_2  Para2_2  ParaN_2   0.01    min
  3  Para1_2  Para2_2  ParaN_2   0.50    max
  </code></pre>
  <p>I have tried differnt things. But nothing seems to be working into the right direction.</p>
  <p>Best Zio</p>