Pandas DataFrames with NaNs equality comparison
In the context of unit testing some functions, I’m trying to establish the equality of 2 DataFrames using python pandas:
In the context of unit testing some functions, I’m trying to establish the equality of 2 DataFrames using python pandas:
Write a function, shut_down, that takes one parameter (you can use
anything you like; in this case, we’d use s for string). The shut_down
function should return “Shutting down…” when it gets “Yes”, “yes”,
or “YES” as an argument, and “Shutdown aborted!” when it gets “No”,
“no”, or “NO”.