Question: I need help to write a code in python to do the following: Starting Hour (derived from School_Hours column) This is a part of database

I need help to write a code in python to do the following:

Starting Hour (derived from School_Hours column)

This is a part of database and the School_Hours column is having the following info:

School_Hours
08:00 AM-03:00 PM
08:15 AM-03:15 PM
08:30 AM-03:30 PM
7:45 AM - 2:45 PM
7:30 AM-2:30 PM
7:45 AM - 2:45 PM
8:30 AM - 2:55 PM
08:30 AM-03:30 PM
8:30 AM-3:30 PM
08:00 AM-03:00 PM
8:00 am-3:30 pm
9:00 AM - 4:15 PM
7:00 am-3:00 pm
08:30 AM-03:30 PM
08:00 AM-03:00 PM
08:45 AM-03:45 PM
8:00 AM-3:30 PM
8:00 AM-3:30 PM
7:45 AM-2:45 PM
07:45 AM-02:45 PM
8:00 am-3:30 pm
9:00 AM - 4:08 PM
7:50 am-3:30 pm
8:00 AM - 3:30 PM
08:30 AM-03:30 PM
7:15a.m.-2:45p.m.
8:00 am-3:30 pm
9:00 AM - 4:00 Pm
08:00 AM-03:00 PM
8:00 AM - 3:13 PM
08:15 AM-03:15 PM
M, T, W, Th: 7:45 AM-3:05 PM F: 7:45 AM-2:07 PM
08:45 AM-03:45 PM
7:30 AM-3:00 PM
7:45 AM - 2:45 PM
08:00 AM-03:00 PM
7:45 AM - 3:00 PM
08:45 AM-03:45 PM
07:45 AM-02:45 PM
8:00 am-3:00 pm
07:45 AM-02:45 PM
8:00 AM - 3:30 PM
8:45 AM-3:45 PM
08:45 AM-03:45 PM
08:00 AM-03:00 PM
8:00 am-3:30 pm
8:00 AM-3:00 PM
8:30 AM-4:00 PM
8:00 AM - 3:15 PM
08:00 AM-03:00 PM
8:00 AM-3:23 PM
8:00 AM-3:00 PM
7:45 AM - 2:45 PM
8:00 AM - 3:30 PM
7:30 AM-2:45 PM
7:45 a.m. - 3:45 p.m.
8:30 AM - 4:00 PM
7:45 AM - 3:41 PM
9:00 AM-4:00 PM
07:45 AM-02:45 PM
07:30 AM-02:30 PM
8:45 AM-3:45 PM
8:00 AM-3:55 PM
07:45 AM-02:45 PM
07:45 AM-02:45 PM
8:00 am-3:30 pm
08:30 AM-03:30 PM
8:30 AM-4:30 PM
8:45 AM - 4:00 PM
7:30 AM-2:30 PM

I need to extract only the start hour from the column into a separate column.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!