parameters: (pcollection, n, key=None, **options)
return_statement: return bigflow.transform_impls.min_elements.min_elements(pcollection, n, key, **options)
docstring: 得到输入PCollection中前n小的元素
  
      Args:
        pcollection (PCollection):  输入PCollection
        n (int/PObject):  必须大于0
        key (function, optional):  用于提取key的函数，与Python内置``max()``中的 ``key`` 参数相同
        **options:  可配置选项
  
      Returns:
        PCollection:  包含前n小元素的PCollection，注意对于n=1，这里仍然返回PCollection
        而非PObject
  
      >>> from bigflow import transforms
      >>> _p = _pipeline.parallelize([3, 7, 1, 3, 2, 8])
      >>> transforms.min_elements(_p, 2).get()
      [1, 2]
      >>> n = _p.count().map(lambda x: x - 1)   # n is PObject(5)
      >>> transforms.min_elements(_p, n, lambda val: -val).get()  # key is -val
      >>> [8, 3, 3, 2, 7]
docstring_summary: 得到输入PCollection中前n小的元素
docstring_tokens: 得到输入PCollection中前n小的元素
function: def min_elements(pcollection, n, key=None, **options):
      """
      得到输入PCollection中前n小的元素
  
      Args:
        pcollection (PCollection):  输入PCollection
        n (int/PObject):  必须大于0
        key (function, optional):  用于提取key的函数，与Python内置``max()``中的 ``key`` 参数相同
        **options:  可配置选项
  
      Returns:
        PCollection:  包含前n小元素的PCollection，注意对于n=1，这里仍然返回PCollection
        而非PObject
  
      >>> from bigflow import transforms
      >>> _p = _pipeline.parallelize([3, 7, 1, 3, 2, 8])
      >>> transforms.min_elements(_p, 2).get()
      [1, 2]
      >>> n = _p.count().map(lambda x: x - 1)   # n is PObject(5)
      >>> transforms.min_elements(_p, n, lambda val: -val).get()  # key is -val
      >>> [8, 3, 3, 2, 7]
  
      """
      import bigflow.transform_impls.min_elements
      return bigflow.transform_impls.min_elements.min_elements(pcollection, n, key, **options)
function_tokens: def min_elements ( pcollection , n , key = None , * * options ) : import bigflow . transform_impls . min_elements return bigflow . transform_impls . min_elements . min_elements ( pcollection , n , key , * * options )