mercredi 19 mai 2021

Create new dataframe Condition wise

I have df like This mention in below

    a   b   marks
 0  1   2    25.0
 1  2   3    96.2
 2  3   6    87.0
 3  4   5    32.2

i want two dataframe Using some condition, condition are if marks are >70.0 then i want df_pass =

      a   b   marks
   1  2   3    96.2
   2  3   6    87.0

and else <70.0 in df_fail

      a   b   marks
  0   1   2    25.0
  3   4   5    32.2

Aucun commentaire:

Enregistrer un commentaire