text_html_output_1.png
import pandas as pd

data = pd.read_csv('/kaggle/input/bank-personal-loan/Bank_Personal_Loan.csv')
df = pd.DataFrame(data)
df

df.isnull().sum()

DF_NONE = df.loc[(df['ZIP Code'] == 92634) | (df['ZIP Code'] == 92717) | (df['ZIP Code'] == 96651) | (df['ZIP Code'] == 9307)]
DF_NONE.reset_index(drop=True, inplace=True)
DF_NONE

DF_NONE1 = df.loc[df['ZIP Code'] == 92717]
DF_NONE1['county'].fillna(value='irvine', inplace=True)
DF_NONE1['lat'].fillna(value=33.6462, inplace=True)
DF_NONE1['long'].fillna(value=-117.839, inplace=True)
DF_NONE1

DF_NONE2 = df.loc[df['ZIP Code'] == 92634]
DF_NONE2['county'].fillna(value='Fullerton', inplace=True)
DF_NONE2['lat'].fillna(value=33.8739, inplace=True)
DF_NONE2['long'].fillna(value=-117.9028, inplace=True)
DF_NONE2

DF_NONE3 = df.loc[df['ZIP Code'] == 96651]
DF_NONE3['county'].fillna(value='Rudno and Hronom', inplace=True)
DF_NONE3['lat'].fillna(value=48.4242, inplace=True)
DF_NONE3['long'].fillna(value=18.7071, inplace=True)
DF_NONE3

DF_NONE4 = df.loc[df['ZIP Code'] == 9307]
DF_NONE4['county'].fillna(value='Albani', inplace=True)
DF_NONE4['lat'].fillna(value=40.68106, inplace=True)
DF_NONE4['long'].fillna(value=19.63539, inplace=True)
DF_NONE4

DF = df.dropna()
df1 = DF.append(DF_NONE1)
df1 = df1.append(DF_NONE2)
df1 = df1.append(DF_NONE3)
df1 = df1.append(DF_NONE4)
df1.reset_index(drop=True, inplace=True)
df1

df1.describe().T

df1.nunique()