Aug-02-2020, 07:26 PM
Hello all
I was hoping someone could help with the following issue.
I keep getting an indentation error when using an If else statement, my code is as follows:-
Can anyone help?
Thank you.
I was hoping someone could help with the following issue.
I keep getting an indentation error when using an If else statement, my code is as follows:-
t=0 while t < len(Data_Frame_Weekly_Tools_Report): data_frame_current = Data_Frame_Weekly_Tools_Report Data_Temp = Data_Frame_Weekly_Tools_Report.iloc[t,0] b=0 while b < len(data_frame_current): if Data_Temp == data_frame_current.iloc[b,0]: #do nothing else: data_frame_current.drop(index=[b,0]) b=b+1 t=t+1The error i get is:-
Error: else:
^
IndentationError: expected an indented block
I know the code looks unorthodox but i understand it but i just dont understand why the hell i keep getting this error????Can anyone help?
Thank you.