ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '07、PRICAI'08、ACML'09 程序委员会主席/共同主席,多次担任 ACM K' at line 1")
import pandas as pd
import numpy as np
a = pd.DataFrame({"A":[">=",5],
"B":["<",6],
"C":["in",'("ha","he")'],
"D":["like","*q*"]
})
print(a)
b = []
for i in a.columns:
b.append(str(i)+" "+str(a[i][0])+" "+str(a[i][1]).strip())
c = " and ".join(b)
#b = b+str(i)+" "+str(a[i][0])+" "+str(a[i][1])+" "+"and"+" "
#print(c)
d = c.split(" and ")
for i in range(3):
locals()['f'+str(i)]=[]
for j in (range(len(d))):
f = d[j].split(" ")
locals()['f' + str(i)].append(f[i])
print(f0,f1,f2)
g = pd.DataFrame(columns=f0,data=[f1,f2])
print(g)
ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '07、PRICAI'08、ACML'09 程序委员会主席/共同主席,多次担任 ACM K' at line 1")
import pandas as pd
import numpy as np
a = pd.DataFrame({"A":[">=",5],
"B":["<",6],
"C":["in",'("ha","he")'],
"D":["like","*q*"]
})
print(a)
b = []
for i in a.columns:
b.append(str(i)+" "+str(a[i][0])+" "+str(a[i][1]).strip())
c = " and ".join(b)
#b = b+str(i)+" "+str(a[i][0])+" "+str(a[i][1])+" "+"and"+" "
#print(c)
d = c.split(" and ")
for i in range(3):
locals()['f'+str(i)]=[]
for j in (range(len(d))):
f = d[j].split(" ")
locals()['f' + str(i)].append(f[i])
print(f0,f1,f2)
g = pd.DataFrame(columns=f0,data=[f1,f2])
print(g)