0
import pandas as pd
import numpy as np
data = {'Name':['T1','T2','T3'],
    'Time column in excel':['01:57:15', '00:30:00', '05:00:00'],
    'Time column in Python':['0.0814236111111111', '0.0208333333333333', '0.208333333333333']}    
df = pd.DataFrame(data)
print (df)
| left | Time column in excel | Time column in Python| Total milliseconds|
| T1  | 01:57:15              |  0.0814236111111111  |                   |
| T2  | 00:30:00              |  0.0208333333333333  |                   |
| T3  | 05:00:00              |  0.208333333333333   |                   |

How to calculate total milliseconds.

I want to use this milliseconds to calculate percentage difference

FObersteiner
  • 22,500
  • 8
  • 42
  • 72
  • values are fractional days, just multiply by 86400 (the number of seconds in a day) to get "total seconds" - now you're just a factor of 1000 away from milliseconds... – FObersteiner Dec 15 '21 at 15:10
  • That is basically described in the answer to [Python Pandas reading time](https://stackoverflow.com/questions/47872835/python-pandas-reading-time) – FObersteiner Dec 15 '21 at 15:11
  • And by the way, please don't [re-post your questions](https://stackoverflow.com/q/70359210/10197418) that were closed. You can always make edits if you want to clarify that it is e.g. not a dupe. – FObersteiner Dec 15 '21 at 15:16

0 Answers0