Data Science, Python, Data Analysis, Data Analytics, Data.
['City1', 'City2', 'City3'] } other_df = pd.DataFrame(other_data) merged_df = pd.merge(df, other_df, on='Department', how='left') print(merged_df) 2.10 Pivot Table # Creating a pivot table pivot_table = df.pivot_table(index='Department', values='Salary', aggfunc='mean') print(pivot_table) 2.11 Data