Question: Q 2 . Create a list named list keys and values: list _ keys = [ ' Country ' , 'Total' ] , list _

Q2.
Create a list named list keys and values: list_keys =['Country', 'Total'], list_values =[['US',"UK","Aus"],[118,453,344]]
Zip the two objects list_keys and list_values and print it (use zip0 function)
convert the zipped object to dictionary named data and print it
convert the dictionary 'data' to dataframe
Build a list of labels: list_labels =['Country','Total Pop']
Assign the list of labels to the columns attribute: df.columns
 Q2. Create a list named list keys and values: list_keys =['Country',

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!