import pandas as pd

df = pd.DataFrame([('Liam', 'M', 19659, 2020), ('Noah', 'M', 18252, 2020),
                   ('Oliver', 'M', 14147, 2020), ('Elijah', 'M', 13034, 2020),
                   ('William', 'M', 12541, 2020), ('Emma', 'F', 15581, 2020),
                   ('Ava', 'F', 13084, 2020), ('Charlotte', 'F', 13003, 2020),
                   ('Sophia', 'F', 12976, 2020), ('Amelia', 'F', 12704, 2020)],
                  columns=['Name', 'Sex', 'Count', 'Year'])

# tests that top-level boolean expressions are parsed
df['Count'] > 13000

# and combinations of boolean expressions
(df['Count'] > 13000) & (df['Count'] < 15000)

# boolean expr + method calls after
((df['Count'] > 13000) & (df['Sex'] == 'M')).sort_values()

# boolean expr using .get()
((df.get('Count') > 13000) &
 (df.get('Count') < 15000) &
 (df.get('Sex') == 'M'))

# boolean expr using another function besides get shouldn't parse labels
df.sort_values('Count') > 13000

# subscripts should NOT get parsed as boolean exprs
df[df['Count'] > 13000]
