A PHP Error was encountered
Severity: Notice
Message: Undefined index: userid
Filename: views/question.php
Line Number: 195
Backtrace:
File: /home/u125378470/domains/lawhelpguru.org/public_html/application/views/question.php
Line: 195
Function: _error_handler
File: /home/u125378470/domains/lawhelpguru.org/public_html/application/controllers/Questions.php
Line: 416
Function: view
File: /home/u125378470/domains/lawhelpguru.org/public_html/index.php
Line: 315
Function: require_once
Convert time strings to hours [closed]
I have an excel sheet that has a "Training Hours" column of data that is written as "1 Hour", "45 Minutes", or "1 Hour 30 Minutes", etc. I want to convert all of the data points to hours to use them as part of the analysis, but I have no idea of how to go about doing that.
My first thought was to use pd.to_datetime, as if it were a date,
df['Training Hours'] = pd.to_datetime(df['Training Hours'])
but I get the error "OutOfBoundsDatetime: Out of bounds nanosecond timestamp: 1-01-01 00:20:00" and I can't figure out why.
Is there any easy way of doing this?