I'm trying to subset a pandas DataFrame in python based on two logical statements
i.e.
d = {'col1': [1, 2], 'col2': [3, 4]}
df = pd.DataFrame(data=d)
df[df.col1 = 1 and df.col2 = 3]
but I'm getting invalid syntax on line3.
Is there a way to do this in one line?