TypeError:unorderable类型:method()<方法()

时间:2018-06-12 13:17:28

标签: python python-3.x pandas

我已将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()

0 个答案:

没有答案