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
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)
Comments
Leave a comment