79659232

Date: 2025-06-09 16:55:52
Score: 0.5
Natty:
Report link

Maybe out of scope, but if we're allowed to use numpy, here's a simple solution.

import numpy  
import pandas as pd  
colsToKeep=np.unique(df.columns,return_index=True)[1]  
df=df.iloc[:,colsToKeep] 
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: JRP