You are given three pandas DataFrames that share a common key column named emp_id:
df1: employee records with columns emp_id and name.df2: department records with columns emp_id and dept.df3: salary records with columns emp_id and salary.First combine df1 and df2 so that only employees appearing in BOTH frames are kept. Then attach salary information from df3 so that every employee from the first combination is preserved even if no salary record exists (missing salaries become NaN).
Return the resulting DataFrame with columns ['emp_id', 'name', 'dept', 'salary'], with rows in the order produced by the merges and the index reset to a default RangeIndex.