Suppose we have a home security system that logs every single time a cat is detected at the doorsteps. Our DataFrame looks like this:
timestamp
0 2022-01-07 18:29:23
1 2022-02-06 08:01:42
2 2022-04-30 02:53:20
3 2022-02-15 17:39:10
4 2022-12-10 23:22:11
We want to manually review this type of activity by looking at the CCTV footage. Create a column calledextract_time, and store the hour, minute, and second as a single string in the HH:MM:SS format (or %H:%M:%S). Print out the resulting DataFrame.
Tip: Use dt.strftime with the proper format.