擅长:python、mysql、java
<p>根据对数据的分析,我可以得出结论,hh部分的小数位实际上是天。示例2.4:30:30=2天4小时30分钟30秒</p>
<pre><code>def cleanhours(x):
hms=x.split(":")
dh=hms[0].split(".")
if len(dh)>1:
hms[0]=str(int(dh[-1])+24*int(dh[-2]))
hms[2] = hms[2].split(".")[0]
return int(hms[0])+int(hms[1])/60.0+int(hms[2])/3600.0
# return ":".join(hms)
</code></pre>