You can just select the columns from each dataframes that you need.
df_1
col_a. |. col_b. |. col_c. |. col_d
v1a. | v2a. | v3a. |. v4a
v2a. |. v2b. |. v3b. |. v4b
....
And,
df_2
col_a. |. col_b. |. col_x. |. col_y
v1a. | v2a. | vxa. |. vya
v2a. |. v2b. |. vxb. |. vyb
....
eg:
merged_df = (df_1.join(df_2, on=["col_a", "col_b"], how="inner")
.select(df_1["col_a"], df_1["col_b"], df_1["col_c"], df_2["col_x"], df_2["col_y"]))
Your result will be:
merged_df
col_a. |. col_b. |. col_c. |. col_x. |. col_y
v1a. | v2a. | v3a. |. vxa. |. vya
v2a. |. v2b. |. v3b. |. vxb. |. vyb
....