Answer to Question #275958 in Python for anil

Question #275958

With the help panda library create a dataframe using the concept of dictionary of lists where Keys and Values of dictionary take the data as mention above in the figure and perform the following operations a) Print All columns name from the dataframe and change the b) Display top 7 and bottom 7 rows of first 3 and last 3 columns c) Write the python code statement to print the value “21-Jan-12” from dataframe. d) Write the python code statement to print the values 2nd,4th ,6th , 8th and 10th row for the column “No of Hours” e) Display the total sum of column total_payout.


1
Expert's answer
2021-12-06T02:16:37-0500
import pandas as pd
  
# dictionary
details = {
    'Ruiru' : 22,
    'Pablo' : 21,
    'hacker' : 23,
    'Vicar' : 23
    }


df = pd.DataFrame(list(details.items()))
df.columns = ['Name','scores']
print(df.columns)

Kindly, provide the dataset for this question

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS