Hello Jayesh,

`def detect_outlier_row(data_1):`

threshold=3

mean_1 = np.mean(data_1)

std_1 =np.std(data_1)

outlier_data=[]

outlier_row=[]

for i in range(len(data_1)):

z_score= (data_1[i] - mean_1)/std_1

if np.abs(z_score) > threshold:

outlier_data.append(data_1[i])

outlier_row.append(i)

return outlier_data, outlier_row

This function will identify the presence of outliers, the outlier values as well as the outlier rows in the dataset.

For visualization of outliers you can use box plots

Hope this helps…