Find the no. of duplicate records in the churn dataframe based on the cutomerID column. For data science using Python in Anaconda - Jupyter
#import the library Pandas
import pandas as pd
#Put the churn.csv dataset on Root Directory
#Read the dataset
churn = pd.read_csv('churn.csv')
#Find the no. of duplicate records in the churn dataframe based on the cutomerID column.
duplicate = churn[churn.duplicated(['customerID'],keep='first')]
duplicate.shape[0]
Output:-
7