original_docstring: Splits clustered chunk into completed and "overlap" parts.
      The overlap points may be part of groups in the following chunk
      and need to be clustered again (with the following chunk).
      The overlap is any points in the last nMaxUncertainty + 2 days of the chunk,
      plus any other points that are part of groups present in that period.
  
      Args:
          chunk (dataframe): a clustered chunk with 'date' and 'group' columns.
  
      Returns:
          completed (dataframe): part of the chunk which is completed.
          overlap (dataframe): part of the chunk with points to re-clustered.
      
docstring: Splits clustered chunk into completed and "overlap" parts.
  The overlap points may be part of groups in the following chunk
  and need to be clustered again (with the following chunk).
  The overlap is any points in the last nMaxUncertainty + 2 days of the chunk,
  plus any other points that are part of groups present in that period.
docstring_tokens: Splits clustered chunk into completed and " overlap " parts . The overlap points may be part of groups in the following chunk and need to be clustered again ( with the following chunk ) . The overlap is any points in the last nMaxUncertainty + 2 days of the chunk plus any other points that are part of groups present in that period .
code: def split_overlap(chunk, end):
      """Splits clustered chunk into completed and "overlap" parts.
      The overlap points may be part of groups in the following chunk
      and need to be clustered again (with the following chunk).
      The overlap is any points in the last nMaxUncertainty + 2 days of the chunk,
      plus any other points that are part of groups present in that period.
  
      Args:
          chunk (dataframe): a clustered chunk with 'date' and 'group' columns.
  
      Returns:
          completed (dataframe): part of the chunk which is completed.
          overlap (dataframe): part of the chunk with points to re-clustered.
      """
      print('chunk', chunk.shape[0])
      print('end', end)
      overlap_groups = chunk[(chunk.day_dense >= end - 2)]['group'].unique()
      overlap = chunk.loc[(chunk.group.isin(overlap_groups)), :].copy()
      print('overlap', overlap.shape[0])
      completed = chunk.loc[~(chunk.group.isin(overlap_groups)), :].copy()
      print('completed', completed.shape[0])
      return completed, overlap
code_tokens: def split_overlap ( chunk , end ) : print ( 'chunk' , chunk . shape [ 0 ] ) print ( 'end' , end ) overlap_groups = chunk [ ( chunk . day_dense >= end - 2 ) ] [ 'group' ] . unique ( ) overlap = chunk . loc [ ( chunk . group . isin ( overlap_groups ) ) , : ] . copy ( ) print ( 'overlap' , overlap . shape [ 0 ] ) completed = chunk . loc [ ~ ( chunk . group . isin ( overlap_groups ) ) , : ] . copy ( ) print ( 'completed' , completed . shape [ 0 ] ) return completed , overlap
short_docstring: Splits clustered chunk into completed and "overlap" parts.
short_docstring_tokens: Splits clustered chunk into completed and " overlap " parts .
comment: """Splits clustered chunk into completed and "overlap" parts.
      The overlap points may be part of groups in the following chunk
      and need to be clustered again (with the following chunk).
      The overlap is any points in the last nMaxUncertainty + 2 days of the chunk,
      plus any other points that are part of groups present in that period.
  
      Args:
          chunk (dataframe): a clustered chunk with 'date' and 'group' columns.
  
      Returns:
          completed (dataframe): part of the chunk which is completed.
          overlap (dataframe): part of the chunk with points to re-clustered.
      """