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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started