Question: Let's consider your data is like the below cell: data = {name: [Joseph, Jacob, Sam, Jesee, Ryan, Lisa, Lee], job: [teacher, psychologist, data scientist, software

Let's consider your data is like the below cell:

data = {"name": ["Joseph", "Jacob", "Sam", "Jesee", "Ryan", "Lisa", "Lee"],

"job": ["teacher", "psychologist", "data scientist", "software developer", "psychologist", "psychologist", "teacher"],

"family_size": [3, 2, 1, 4, 2, 3, 2],

"num_cars": [3, 1, 1, 2, 2, 4, 1]}

Q1-1: Write a Python program that create a dataframe from the data.

Q1-2: Select people that are psychologist or teacher and their number of cars is greater than their family size.

Q1-3: Select people who have at most 2 family members and at least 1 car.

Q1-4: Write a Python code that get number of unique jobs in this dataset.

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!