I have a dataframe which consist of datetime, class columns. The class column has values as \'open\', \'close\'. This is an IOT data. I have to calculate the total open time