Can someone clarify what 'w = 126060*1000 # half day in ms'stands for in below coding?
Indexing
import pandas as pd
w = 126060*1000 # half day in ms
df.index = pd.to_datetime(df.index)
Thanks in advance for your time and support.
Can someone clarify what 'w = 126060*1000 # half day in ms'stands for in below coding?
import pandas as pd
w = 126060*1000 # half day in ms
df.index = pd.to_datetime(df.index)
Thanks in advance for your time and support.
To convert 1 hour into milliseconds, you need to multiply it by 60601000. So, to convert 12 hours (which is half-day), you need to multiply it by 126060*1000.
Reference: https://www.timecalculator.net/hours-to-milliseconds