Commit 4426d8db authored by 张彦钊's avatar 张彦钊

修改str.cat

parent f896ed52
......@@ -65,9 +65,12 @@ def transform(df,table):
df["ffm"] = df["seq"].str.cat([df["y"].values.tolist(), df["ffm"].values.tolist()], sep=",")
df["number"] = np.random.randint(1, 2147483647, df.shape[0])
df = df.drop(0, axis=1)
yconnect = create_engine('mysql+pymysql://root:3SYz54LS9#^9sBvC@10.66.157.22:4000/jerry_test?charset=utf8')
pd.io.sql.to_sql(df, table, yconnect, schema='jerry_test', if_exists='append', index=False)
print("insert done")
print("size")
print(df.shape)
# for i in range(len(df.shape[0]))
# yconnect = create_engine('mysql+pymysql://root:3SYz54LS9#^9sBvC@10.66.157.22:4000/jerry_test?charset=utf8')
# pd.io.sql.to_sql(df, table, yconnect, schema='jerry_test', if_exists='append', index=False)
# print("insert done")
class multiFFMFormatPandas:
......
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