If you would like to use matplotlib to plot time series figures, here are some options:
(1) extract only the time component using df[col].dt.time
, resulting column is string object
import pandas as pd
df = pd.DataFrame({'Time(H:M:S)': ['11:02:03', '11:22:33', '12:00:01']})
df['Time(H:M:S)'] = pd.to_datetime(df['Time(H:M:S)'].astype(str)).dt.time
print(df)
Time(H:M:S)
0 11:02:03
1 11:22:33
2 12:00:01
(2) add today's date as prefix and convert to datetime object
df['Time(H:M:S)2'] = pd.to_datetime('2022-08-22 ' + df['Time(H:M:S)'].astype(str))
print(df)
Time(H:M:S) Time(H:M:S)2
0 11:02:03 2022-08-22 11:02:03
1 11:22:33 2022-08-22 11:22:33
2 12:00:01 2022-08-22 12:00:01
(3) convert to timedelta object, resulting column is timedelta object with prefix "0 days"
df['Time(H:M:S)3'] = pd.to_timedelta(df['Time(H:M:S)'].astype(str))
print(df)
Time(H:M:S) Time(H:M:S)2 Time(H:M:S)3
0 11:02:03 2022-08-22 11:02:03 0 days 11:02:03
1 11:22:33 2022-08-22 11:22:33 0 days 11:22:33
2 12:00:01 2022-08-22 12:00:01 0 days 12:00:01
(4) convert datetime into Epoch timestamp, resulting column is int object
df['Time(H:M:S)4'] = pd.to_datetime(df['Time(H:M:S)'].astype(str)).astype('int64') // int(1e9)
print(df)
Time(H:M:S) Time(H:M:S)1 Time(H:M:S)2 Time(H:M:S)3 Time(H:M:S)4
0 11:02:03 11:02:03 2022-08-22 11:02:03 0 days 11:02:03 1661166123
1 11:22:33 11:22:33 2022-08-22 11:22:33 0 days 11:22:33 1661167353
2 12:00:01 12:00:01 2022-08-22 12:00:01 0 days 12:00:01 1661169601
The column types are
print(df.info())
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 Time(H:M:S) 3 non-null object
1 Time(H:M:S)2 3 non-null datetime64[ns]
2 Time(H:M:S)3 3 non-null timedelta64[ns]
3 Time(H:M:S)4 3 non-null int64