I have the below sample dataframe. Each hour has 5 instances. Is there any module or a way to find the missing data in a given column in Python. For instance for hour 2, instance 3 is missing. How can we identify this missing instance in a larger dataset dynamically in Python and print a message that an instance is missing.
Date Hour Instance
2022-10-20 1 1
2022-10-20 1 2
2022-10-20 1 3
2022-10-20 1 4
2022-10-20 1 5
2022-10-20 2 1
2022-10-20 2 2
2022-10-20 2 4
2022-10-20 2 5
Thank you.
Instancefor each hour. Filter for hours whose value counts are not 5. Next, create two lists - unique Dates and unique Hours. Now aggregate over each Instance. Wherever the count is off, that's the Date/Hour with a missing pattern