Quote:
I tried adjusting the spacing but I am getting the following error again and again.
The problem is the number of spaces
for i,row in train_df.iterrows():
if row['Age']>0 and row['Age']<=10:
if row['Pclass']==1 :
sp11=sp11+row['Survived']
cp11=cp11+1
elif row['Pclass']==2:
sp12=sp12+row['Survived']
cp12=cp12+1
else:
sp13=sp13+row['Survived']
cp13=cp13+1
if row['Age']>10 and row['Age']<=20:
but anything inside the loop must have the same indentation.