df2 = pd.read_excel("Testingt2.xlsx");
print(df2);
df2.to_sql(
name='t3',
con=engine,
if_exists='append',`enter code here`
index=False
)
print(df2);
df2['new_col'] = df2.apply(lambda x: '-'.join(x.dropna().astype(str).id.depth), axis=1);
print (df2);
如何将其用于特定列
df2['new_col'] = df2.apply(lambda x: '-'.join(x.dropna().astype(str).id.depth), axis=1);
print (df2); -----