Commit 2d3a1307 authored by 张彦钊's avatar 张彦钊

esmm 测试项目增加知识图谱特征

parent a84b57dd
...@@ -6,15 +6,10 @@ import datetime ...@@ -6,15 +6,10 @@ import datetime
def con_sql(db,sql): def con_sql(db,sql):
cursor = db.cursor() cursor = db.cursor()
try: cursor.execute(sql)
cursor.execute(sql) result = cursor.fetchall()
result = cursor.fetchall() df = pd.DataFrame(list(result))
df = pd.DataFrame(list(result)) db.close()
except Exception:
print("发生异常", Exception)
df = pd.DataFrame()
finally:
db.close()
return df return df
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment