×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Python
Posted by: Ward Steemans
Added: Jun 5, 2022 9:05 PM
Views: 11
Tags: no tags
  1. def check(x):
  2.     if (x == '6-11yrs'):
  3.         return 1
  4.     else:
  5.         return 0
  6.  
  7. data1['y_true'] = data1['y_true'].apply(check)
  8. data2['y_true'] = data2['y_true'].apply(check)