My input:
df.query('date == 2009')[df['id'] == 35988].index[0]
The error raised:
C:\Anaconda\lib\site-packages\ipykernel_launcher.py:1: UserWarning: Boolean Series key will be reindexed to match DataFrame index. "Entry point for launching an IPython kernel.
The output:
11136
How to avoid an error, keeping given output?