Answer to Question #310717 in Python for Akash Singh

Question #310717

Problem Statement: You work in XYZ Corporation as a Data Analyst. Your corporation has told you to analyze the customer_churn dataset with various functions


1. Now select the rows from 20th index till 200th index (exclusive), and columns from 2nd index till 15th index value


Problem Statement: You work in XYZ Corporation as a Data Analyst. Your corporation has told you to analyze the customer_churn dataset with various functions.


1. Display the top 100 records from the original data frame.

2. Display the last 10 records from the data frame.

3. Display the last record from the data frame


1
Expert's answer
2022-03-13T15:11:35-0400
import pandas as pd 
df = pd.read_csv('customer_churn.csv')
#Now select the rows from 20th index till 200th index (exclusive), and columns from 2nd index till 15th index value
df.iloc[20:200,2:16]



#1. Display the top 100 records from the original data frame. 
df.head(100)



#2. Display the last 10 records from the data frame. 
df.tail(10)



#3. Display the last record from the data frame
df.tail(1)

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