'comparing two columns of a row in python dataframe

I know that one can compare a whole column of a dataframe and making a list out of all rows that contain a certain value with:

values = parsedData[parsedData['column'] == valueToCompare]

But is there a possibility to make a list out of all rows, by comparing two columns with values like:

values = parsedData[parsedData['column01'] == valueToCompare01 and parsedData['column02'] == valueToCompare02]

Thank you!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source