Jun-11-2020, 09:08 AM
I keep getting this error and i am not sure on how to fix it. It shouldn't be a formatting/brackets thing but at this point I wouldn't be surprised. Thank you for any help.
print("What two companies would you like to compare? ")
Company1 = input("What is the first company you would like? ")
Company2 = input("What is the second company you would like to add? ")
comData = [Company1, Company2]
carComData = (comData)
cursor.execute("Select * from Cars where (Car_brand like %s) or (Car_brand like %s) order by car_id", (Company1, Company2))
cursor.execute(sql)
result = cursor.fetchall()
df = pd.DataFrame(result, columns=['Car_id', 'Car_Brand', 'Car_Model', 'Year', 'VIN', 'KmsTravelled', 'Price', 'Dealer_id'])
print (df)
