merge dataframe pandas to only selected columns code example
Example: python - merge and incluse only specific columns
right.merge(left, on=['key1','key2'])[['A','B','C','key1','key2']]
right.merge(left, on=['key1','key2'])[['A','B','C','key1','key2']]