I have in postgres a column of type TimeField, it stores only time (hour, minute, seconds …)
After transforming this data into a dataframe it is presented as below:
It sounds like you just need to create a uniform format to display the data in the table.
For example, you can either apply ‘.000000’ to the remaining ones who do not have the milliseconds.
Or, apply it in reverse and remove the milliseconds.
If you add, then you would be able to filter by interval.
import pandas as pd
df = pd.DataFrame({
'timestamp':[
'11:01:26.473000',
'10:45:13',
'14:11:27.043000',
'14:11:22',
'14:08:32.749000',
]
})
for i, r in df.iterrows():
r['timestamp'] = r['timestamp'].split('.')[0]
print(df)
Keep in mind, there mind be some other ways to accomplish this.