Y = ['Outlier Treatment']
out_lier = st.selectbox('Remove the outlier here', Y)
if out_lier == 'Outlier Treatment':
def outlier_treatment(data):
Q1 = data.quentile(0.25)
Q3 = data.quentile(0.75)
IQR = Q3 - Q1
df_rem_out = data[~((data < (Q1 - 1.5*IQR)) | (data > (Q3 +1.5*IQR))).any(axis =1)]
Ot = outlier_treatment(data)
st.write('Outlier Removed', Ot)
This is my code and i am getting invalid syntax. few days back it was working fine but now its not working, i am writing the code on notepad, and trying to develop a app. kindly help #Questions#Urgent