Is there a way to convert true of type unicode to 1 and false of type unicode to 0 (in Python)?
true
unicode
false
For example: x
x
You can use x.astype('uint8') where x is your Boolean array.
x.astype('uint8')