'Boolean Comparison in df

I am trying to write to a dataframe for values in a column which lie between a certain hex values range. How do I implement the comparison for boolean dtype.

if(r_adr.between(int('40000000',base=16),int('5FFFFFFF',base=16)))== True:
        data['Read_Block']='ExtMem_2'

The length of r_adr and data are different.



Solution 1:[1]

(r_adr.between(int('40000000',base=16),int('5FFFFFFF',base=16))) is a Tuple, so it will never be True (Boolean type). Also, I think it's == True not is True

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 BrainFl