This is the dataset of parking area. The dataset have different parking area with different time as well. I want to insert rate for specific parking area for different time like morning, evening and night. https://prnt.sc/5pl1usWXVZQt
I tried grouping according to area and time. Now I want to insert accordingly. for example parkingrate for FirstHill at morning 8 to 11AM is 0.5$. Can anyone help me with this? https://prnt.sc/iTohLXmkYXsd
df_parking_1 = df_parking.groupby(['PaidParkingArea','OccupancyDateTime'])
You do not need Panda
groupbyto do that, here is a reproducible example:To insert a new column
PaidParkingRatewhich value is $ 0.5 whenPaidParkingAreaisFirst HillandOccupancyDateTimeis beteween 8 AM and 11 AM, you can for instance use Pandas loc instead:Then: