original_docstring: Parse the events DataFrame with all experiment information into a smaller Dataframe with only relevant information for selected event type.
docstring: Parse the events DataFrame with all experiment information into a smaller Dataframe with only relevant information for selected event type.
docstring_tokens: Parse the events DataFrame with all experiment information into a smaller Dataframe with only relevant information for selected event type .
code: def prepare_events(recording, time_column, category_column):
      """Parse the events DataFrame with all experiment information into a smaller Dataframe with only relevant information for selected event type."""
      new_events = recording['events'][[time_column, category_column]]
      new_events.columns = ['time', 'code']
      new_events['time'] = pd.to_datetime(new_events['time'])
      new_events.set_index('time', inplace = True)
  
      recording[time_column] = new_events
      
      return new_events
code_tokens: def prepare_events ( recording , time_column , category_column ) : new_events = recording [ 'events' ] [ [ time_column , category_column ] ] new_events . columns = [ 'time' , 'code' ] new_events [ 'time' ] = pd . to_datetime ( new_events [ 'time' ] ) new_events . set_index ( 'time' , inplace = True ) recording [ time_column ] = new_events return new_events
short_docstring: Parse the events DataFrame with all experiment information into a smaller Dataframe with only relevant information for selected event type.
short_docstring_tokens: Parse the events DataFrame with all experiment information into a smaller Dataframe with only relevant information for selected event type .
comment: """Parse the events DataFrame with all experiment information into a smaller Dataframe with only relevant information for selected event type."""