我有两个带有多列的数据框。我想将两个数据帧中的所有列合并为一个列。值的顺序和重复并不重要。
尝试过vstack
old_df = pd.read_excel("output_related_old.xlsx")
new_df = pd.read_excel("output_related_new.xlsx")
print(old_df, new_df)
df_list=[old_df, new_df]
delete_list=["date","timestamp","son_value","gson_value"]
for delete in delete_list:
del old_df[delete]
del new_df[delete]
old_df = old_df.append(new_df)
old_df.to_excel("excel.xlsx")