Skip to content

why does ~True not work in pandas dataframe conditional

I am trying to use switches to turn on and off conditionals in a pandas dataframe. The switches are just boolean variables that will be True or False. The problem is that ~True does not evaluate the same as False as I expected it to. Why does this not work? Answer This is a pandas operator behavior (implement…