code: def cumcount(expr, sort=None, ascending=True, unique=False,
               preceding=None, following=None):
      
      data_type = types.int64
      return _cumulative_op(expr, CumCount, sort=sort, ascending=ascending,
                            unique=unique, preceding=preceding,
                            following=following, data_type=data_type)
docs: Calculate cumulative count of a sequence expression.
  
      :param expr: expression for calculation
      :param sort: name of the sort column
      :param ascending: whether to sort in ascending order
      :param unique: whether to eliminate duplicate entries
      :param preceding: the start point of a window
      :param following: the end point of a window
      :return: calculated column