我已将SQL查询的结果导入数据帧,并使用get_values函数将其转换为ndarray。在np.setxor1d
函数的帮助下比较这样的2个ndarray:
data_cmp_1 = np.setxor1d(df_hq,df_lz)
print("Difference between Lz and hawq :",t,data_cmp_1)
它给了我以下错误:
Traceback (most recent call last):
File "new_hawq_lz.py", line 98, in <module>
data_cmp_1 = np.setxor1d(df_hq,df_lz)
File "/usr/lib64/python3.4/site-packages/numpy/lib/arraysetops.py", line 377, in setxor1d
aux.sort()
TypeError: unorderable types: method() < method()