image_output_1.png
from scipy.stats import f_oneway

import pandas as pd #to handle the dataframe

data = pd.read_csv('/kaggle/input/churn-predictions-personal/Churn_Predictions.csv')

data.isnull().sum()
' It\'s alaways necessary to check for the missing values. "Nan" is not always missing values. Missing values can be present in other format also.\nFeature can also have 0\'s which can also be treated as missing values for some particular dataset. Here in this case we dont have any missing value present \nin the dataset which saves a lot of time'

"""We can also check the top N customers based on their current account balance. Here 1 means left 0 means still with the bank"""
top_N = data.nlargest(20, 'Balance')
bottom_N = data.nsmallest(20, 'Balance')

from scipy.stats import f_oneway
grouped_data = data.groupby('Exited')['Age'].apply(list)
f_statistic, p_value = f_oneway(*grouped_data)

data.corr()