Question: a ) Create a DataFrame df from the following dictionary: data = { 'Name': [ ' Alice ' , 'Bob', 'Charlie', 'David', 'Eva' ] ,

a) Create a DataFrame df from the following dictionary:
data ={
'Name': ['Alice', 'Bob', 'Charlie', 'David', 'Eva'],
'Age': [24,27,22,32,29],
'City': ['New York', 'Los Angeles', 'Chicago', 'Houston', 'Phoenix'],
'Score': [85.5,90.0,78.0,88.5,95.0]
}
b) Display the first two rows of the DataFrame.
c) Get summary statistics of the numerical columns.
d) Add a new column 'Passed' to the DataFrame where the value is True if 'Score' is greater than or equal to 80, else False.

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 Programming Questions!