# Raise warning if duplicate is detected df_combined = pd.concat([df1, df2], axis=1) \ .set_flags(allow_duplicate_labels=False) # Check if duplicates exist then remove df_combined = df.loc[:. ~df_combined.columns.duplicated()].copy()
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter