def remove_dup_columns(frame):
        
   """
   Removes duplicate columns (same column name) from dataframe.
   """
   
   keep_names = set()
   keep_icols = list()
   for icol, name in enumerate(frame.columns):
       if name not in keep_names:
              keep_names.add(name)
              keep_icols.append(icol)
   return frame.iloc[:, keep_icols]