original_docstring: 
          Split trajectory into subtrajectories using regular time intervals.
  
          Parameters
          ----------
          mode : str
              Split mode
  
          Returns
          -------
          list
              List of trajectories
          
docstring: Split trajectory into subtrajectories using regular time intervals.
  Parameters
  
  mode : str
  Split mode
  
  Returns
  
  list
  List of trajectories
docstring_tokens: Split trajectory into subtrajectories using regular time intervals . Parameters mode : str Split mode Returns list List of trajectories
code: def split_by_date(self, mode='day'):
          """
          Split trajectory into subtrajectories using regular time intervals.
  
          Parameters
          ----------
          mode : str
              Split mode
  
          Returns
          -------
          list
              List of trajectories
          """
          result = []
          if mode == 'day':
              grouped = self.df.groupby(Grouper(freq="D"))
          elif mode == 'month':
              grouped = self.df.groupby(Grouper(freq="M"))
          elif mode == 'year':
              grouped = self.df.groupby(Grouper(freq="Y"))
          else:
              raise ValueError('Invalid split mode {}. Must be one of [day, month, year]'.format(mode))
          for key, values in grouped:
              if len(values) > 1:
                  result.append(Trajectory(values, '{}_{}'.format(self.id, key)))
          return result
code_tokens: def split_by_date ( self , mode = 'day' ) : result = [ ] if mode == 'day' : grouped = self . df . groupby ( Grouper ( freq = "D" ) ) elif mode == 'month' : grouped = self . df . groupby ( Grouper ( freq = "M" ) ) elif mode == 'year' : grouped = self . df . groupby ( Grouper ( freq = "Y" ) ) else : raise ValueError ( 'Invalid split mode {}. Must be one of [day, month, year]' . format ( mode ) ) for key , values in grouped : if len ( values ) > 1 : result . append ( Trajectory ( values , '{}_{}' . format ( self . id , key ) ) ) return result
short_docstring: Split trajectory into subtrajectories using regular time intervals.
short_docstring_tokens: Split trajectory into subtrajectories using regular time intervals .
comment: """
          Split trajectory into subtrajectories using regular time intervals.
  
          Parameters
          ----------
          mode : str
              Split mode
  
          Returns
          -------
          list
              List of trajectories
          """