code: def distinct(expr, on=None, *ons):
      
  
      on = on or list()
      if not isinstance(on, list):
          on = [on, ]
      on = on + list(ons)
  
      on = [it(expr) if inspect.isfunction(it) else it for it in on]
  
      return DistinctCollectionExpr(expr, _unique_fields=on, _all=(len(on) == 0))
docs: Get collection with duplicate rows removed, optionally only considering certain columns
  
      :param expr: collection
      :param on: sequence or sequences
      :return: dinstinct collection
  
      :Example:
  
      >>> df.distinct(['name', 'id'])
      >>> df['name', 'id'].distinct()