Here's a sample dataframe:
df = pd.DataFrame([['A0000x', 'a'],
['B0010x', 'b'],
['C0020x', 'c'],
['D0040x', 'd']])
df.columns = ['num', 'let']
I would like to extract only the rows where the integer comprised of 3rd and 4th character in the num
column is divisible by 2, for example.
So I need to check if df['num'][2:4] % 2
I got this far, but can't figure out how to convert it into an integer:
df.index[df['num'].str[2:4] == '01']