我正在尝试连接从 SQL 查询创建的两个 DataFrame(称为 firstData 和 lastData)。但是,当我尝试连接它们时,我收到一条错误消息TypeError: can't compare datetime.datetime to int
。从这条消息来看,我认为问题在于与 AUTHORIZED 字段的连接。具有数据框外观的虚拟数据如下。关于如何解决这个问题的任何想法?
print firstData
ORDER_ID EMAIL IP AUTHORIZED
0 1234567 dummy@dummy.net x.x.x.x 2008-11-15 19:16:07
1 8911234 dummy@dummy.com x.x.x.x 2008-11-15 17:59:55
2 4567833 dummy@dummy.com x.x.x.x 2008-11-15 17:50:20
HOUR DAY_OF_WEEK SHIPMENT_TYPE ZIPS_MATCH MERCH_SUBCAT
0 19 7 Standard 1 Her Accessory
1 17 7 Standard 1 Her Accessory
2 17 7 Standard 1 Kid toy/clothes
print lastData
ORDER_ID EMAIL IP AUTHORIZED
3 1234567 dummy@dummy.net x.x.x.x 2008-11-15 17:43:13
4 8901234 dummy@dummy.com x.x.x.x 2008-11-15 13:18:01
5 4567890 dummy@dummy.com x.x.x.x 2008-11-15 09:29:10
HOUR DAY_OF_WEEK SHIPMENT_TYPE ZIPS_MATCH MERCH_SUBCAT
3 17 7 Standard 1 Bag
4 13 7 Standard 1 Paperweight/boxes
5 09 7 Standard 0 Candle
concat(firstData, lastData)
TypeError: can't compare datetime.datetime to int