converting 4hr 20min to minutes

Solutions on MaxInterview for converting 4hr 20min to minutes by the best coders in the world

showing results for - "converting 4hr 20min to minutes"
Jonathan
15 Jul 2019
1df['Duration']=  df['Duration'].str.replace("h", '*60').str.replace(' ','+').str.replace('m','*1').apply(eval)