Error in Python script node

Hello @mohini1329 and welcome to the KNIME forum.

Have you tried to reset the index values to your DF?

df = pd.concat([df.reset_index(drop=True)], axis=1).copy()

BR