How to add Columns for Automatic Fill on Pandas Python

omsas
New Contributor

1. I have data x,I would like to create a new column with the condition that the value are 1, 2 or 3

2. The name of the column is SHIFT where this SHIFT column will be filled automatically if the TIME_CREATED column meets the conditions.

3. the condition are :

# 00:00:00 - 07.59.59 = Shift 1

# 08:00:00 - 15:59:59 = Shift 2

# 16:00:00 - 23:59:59 = Shift 3

4. on the above conditions apply only to Time as hours:minutes:seconds

5. I attach the link of the py and ipynb files for test and study

6. I've tried the test only for the selection using a query but it's still stuck and it only shows up for 1 day.

https://drive.google.com/drive/folders/1xdDwNfbDNzYb2SfJ_h-DurY_KXFAj9rl?usp=sharing

Columns TableResult of testedThanks,