ii=0 ...jj=0 ...for i, row in new_df.iterrows():
z=len(row)-1
k=row
ii=ii+1
jj=0
##print(k.iloc[0])
for j, column in row.iteritems():
z=z-1
jj=jj+1
if z>23:
new_df.loc[ii][jj],k.iloc[z]=k.iloc[z],new_df.iloc[ii][jj]
I have tried running it but it is giving error ...
:13: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation.