0

I am trying to compare two columns. But i keep getting the error below i have changed the datatype of the columns as well but it doesn't help

col1 = \['AB12345C',WE23456K',CX23987L'\]

col2 = \['LK09876P',PO87654A',NM98765Z'\]

if col1 != col2:
print('okay')
else:
print('nothing')

Error:Can only compare identically labeled data frame objects

Pandas "Can only compare identically-labeled DataFrame objects" error

Python Pandas Only Compare Identically Labeled DataFrame Objects

I have tried some solutions based on the above links as well but still getting the same answer.

0 Answers0