Question: import numpy as np import pandas as pd data_df = {'Name': ['Asha', 'Harsh', 'Sourav', 'Riya', 'Hritik', 'Shivansh', 'Rohan', 'Akash', 'Soumya', 'Kartik'], 'Department': ['Administration', 'Marketing', 'Technical',

import numpy as np import pandas as pd

data_df = {'Name': ['Asha', 'Harsh', 'Sourav', 'Riya', 'Hritik', 'Shivansh', 'Rohan', 'Akash', 'Soumya', 'Kartik'],

'Department': ['Administration', 'Marketing', 'Technical', 'Technical', 'Marketing', 'Administration', 'Technical', 'Marketing', 'Technical', 'Administration'],

'Employment Type': ['Full-time Employee', 'Intern', 'Intern', 'Part-time Employee', 'Part-time Employee', 'Full-time Employee', 'Full-time Employee', 'Intern', 'Intern', 'Full-time Employee'],

'Salary': [120000, 50000, 70000, 70000, 55000, 120000, 125000, 60000, 50000, 120000],

'Years of Experience': [5, 1, 2, 3, 4, 7, 6, 2, 1, 6]} df1 = pd.DataFrame(data_df) print(df1)

1.Group the dataframe based on employment type, and department.

2. Use aggregate function calculate the salary mean, std, sum, min, and max

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!