输入数组中整数的二进制按位与(and)运算由np.bitwise_and()函数计算。
import numpy as np print 'Binary equivalents of 13 and 17:' a,b=13,17 print bin(a), bin(b) print '\n' print 'Bitwise AND of 13 and 17:' print np.bitwise_and(13, 17)
其输出如下-
Binary equivalents of 13 and 17: 0b1101 0b10001 Bitwise AND of 13 and 17: 1
这一章《NumPy - 按位运算符 - 与运算符 函数》你学到了什么?在下面做个笔记吧!做站不易,你的分享是对我们最大的支持
有没有一种好方法可以将 pandas 列多索引转换为列类别?