This is my DataFrame:
data.where(data["Gender"] == "Male") and data.where(data["Age"] == 19)
I'm trying to print matching values but i get this error. Explain the output.
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
in
----> 1 data.where(data["Gender"] == "Male") and data.where(data["Age"] == 19)
~\Anaconda3\lib\site-packages\pandas\core\generic.py in __nonzero__(self)
1553 "The truth value of a {0} is ambiguous. "
1554 "Use a.empty, a.bool(), a.item(), a.any() or a.all().".format(
-> 1555 self.__class__.__name__
1556 )
1557 )
ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().