Question: Q 2 . Create a list named list keys and values: list _ keys = [ ' Country ' , 'Total' ] , list _
Q
Create a list named list keys and values: listkeys Country 'Total' listvalues USUK"Aus"
Zip the two objects listkeys and listvalues and print it use zip function
convert the zipped object to dictionary named data and print it
convert the dictionary 'data' to dataframe
Build a list of labels: listlabels Country'Total Pop'
Assign the list of labels to the columns attribute: dfcolumns
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
