Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

pandas convert text duration to minutes

df['Duration']=  df['Duration'].str.replace("h", '*60').str.replace(' ','+').str.replace('m','*1').apply(eval)
Comment

PREVIOUS NEXT
Code Example
Python :: platform.system() return value 
Python :: is assimilation part of digestive system 
Python :: superpixel 
Python :: scrapy pass string as html 
Python :: access data in one python function from another 
Python :: copy a 2d list python 
Python :: how to take integer input in python 
Python :: slice in iloc 
Python :: python list safely pop 
Python :: obspy stats 
Python :: Multiple sub in single regex. 
Python :: python long 
Python :: Pouring 8 litres into 2 empty container of size 3 and 5 to get 4 litre in any container 
Python :: l1=[122, 5, 9, 4] l2=[991, 4, 8, 3] x=[l1[i]-l2[i] for i in range(abs(len(l1)), abs(len(l2)))] print (x) 
Python :: odd or even checker 
Python :: sns countplot show only largest 
Python :: train_ttest_split() 
Python :: Find & set values in pandas Dataframe 
Python :: how to convert 2 dimensional in 1 dimensional array 
Python :: qmenu hide python 
Python :: python pass function as argument 
Python :: how to open any application in python 
Python :: sort an array in python 
Python :: syntax error python 
Python :: import turtle in python 
Python :: whatsapp bot python code 
Python :: bokeh bar chart 
Python :: rotate 2 dimensional list python 
Python :: function to scale features in dataframe 
Python :: installing python 3 to linux 
ADD CONTENT
Topic
Content
Source link
Name
1+7 =