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 :
if row['Age']>10 and row['Age']<=20:
but anything inside the loop must have the same indentation.