When I work with a pandas dataframe:
df = pd.DataFrame({
'one' : [1., 2., 3., 4.],
'two' : [4., 3., 2., 1.]})
Why does the following statement throw an error:
df['one'] > 1 & df['two'] > 2
and this doesn't:
(df['one'] > 1) & (df['two'] > 2)
Or to be more precise, why do I need brackets here?