Suppose I have a .csv which follows this format:
Name, Salary, Department, Mandatory
Rob, 5500, Aviation, Yes
Bob, 1000, Facilities, No
Tom, 6000, IT, Yes
After exporting this to pandas/modin, I'd like to perform row-differentiated checks, where:
People named Rob working in aviation cannot earn less than 5000
People named Bob working in facilities cannot earn less than 1000
Whoever works in facilities has to report their salary, while people working in aviation or IT can choose to leave their salary unreported.
If any check is violated, we store this in a dataframe and pass forward this case to the human resources department for further investigation.
How would you validate this .csv using Pandera?