original_docstring: 
      #input sequencer for repeated file_name_origin
       In case of split origin files, will be different output files
        with the same source file name.
        In this case, it is necessary to differentiate the name of the source
        files in the timestamp, through a numeric sequence.
        e.g.: filename_P01, filename_P02
      
docstring: input sequencer for repeated file_name_origin
  In case of split origin files, will be different output files
  with the same source file name.
  In this case, it is necessary to differentiate the name of the source
  files in the timestamp, through a numeric sequence.
docstring_tokens: input sequencer for repeated file_name_origin In case of split origin files will be different output files with the same source file name . In this case it is necessary to differentiate the name of the source files in the timestamp through a numeric sequence .
code: def create_df_description_with_folder(df):
  
      def show_log_about_files_in_root_folder(df_video_detail_folder):
          """Show info log, pointing the original files
              whose internal folder was not found,
              assuming they are in the root folder.
  
          Args:
              df_video_detail_folder (dataframe):
                  required column: file_name_origin_seq
          """
  
          list_file_name_origin_seq = \
              df_video_detail_folder['file_name_origin_seq'].tolist()
          str_list_file_name_origin_seq = \
              ', '.join(list_file_name_origin_seq)
          logging.info(
              'It may not be a problem, ' +
              'but no internal folder was identified. ' +
              'Check if the original files are ' +
              'in the root project folder. If so, the behavior is normal: ' +
              f'"{file_output}: [{str_list_file_name_origin_seq}]"')
  
      # create column time_stamp_str
      df['time_stamp'] = pd.to_timedelta(df['time_stamp'], unit='D')
      df['time_stamp_str'] = df['time_stamp'].apply(timedelta_to_string)
  
      # creat list with cols folders names
      cols_folders_start = list(df.columns).index('time_stamp') + 1
      cols_folders_finish = list(df.columns).index('time_stamp_str')
      cols_folders = list(df.columns)[cols_folders_start:cols_folders_finish]
  
      # Remove file extension in values from column file_name_origin
      df['file_name_origin'] = \
          df['file_name_origin'].apply(get_file_name_without_extension)
  
      """
      #input sequencer for repeated file_name_origin
       In case of split origin files, will be different output files
        with the same source file name.
        In this case, it is necessary to differentiate the name of the source
        files in the timestamp, through a numeric sequence.
        e.g.: filename_P01, filename_P02
      """
      df = sequencer_file_repeated(df, 'file_name_origin')
  
      # fill columns file_output with file_path_output
      # TODO: instead of filling, adapt code to work
      #       with the file_path_output columns
      df['file_output'] = df['file_path_output']
  
      # create dataframe description as df_output
      df_output = df.copy()
      cols_keep = ['file_name_origin', 'file_output',
                   'duration', 'head_file']
      df_output = df_output.loc[:, cols_keep]
      df_output = df_output.drop_duplicates(subset='file_output', keep='first')
      df_output['description'] = ''
      df_output['warning'] = ''
      for index, row in df_output.iterrows():
          file_output = row['file_output']
          mask_file_output = df['file_output'].isin([file_output])
          cols_df_video_details = (['file_name_origin_seq', 'time_stamp_str'] +
                                   cols_folders)
          df_video_details = df.loc[mask_file_output, cols_df_video_details]
          df_video_details = df_video_details.reset_index()
  
          description = ''
          # list of folders origin from the output file
          col_folder = cols_folders[0]
          list_folders = list(df_video_details[col_folder].unique())
          for index_folder, folder in enumerate(list_folders):
              mask_folder = df_video_details[col_folder].isin([folder])
              df_video_detail_folder = df_video_details.loc[mask_folder, :]
  
              if folder is None:
                  show_log_about_files_in_root_folder(df_video_detail_folder)
                  folder = ''
  
              if index_folder == 0:
                  description = folder
              else:
                  description = description + '\n\n' + folder
              for _, row in df_video_detail_folder.iterrows():
                  file_name_origin_seq = row['file_name_origin_seq']
                  description = (description + '\n' + row['time_stamp_str'] +
                                 ' ' + file_name_origin_seq)
          # check for size char limit in description
          if len(description) > 1000:
              df_output.loc[index, 'warning'] = 'max size reached'
          else:
              pass
          df_output.loc[index, 'description'] = description
  
      df_output = df_output.reindex(['file_output', 'description', 'warning'],
                                    axis=1)
  
      return df_output
code_tokens: def create_df_description_with_folder ( df ) : def show_log_about_files_in_root_folder ( df_video_detail_folder ) : """Show info log, pointing the original files
              whose internal folder was not found,
              assuming they are in the root folder.
  
          Args:
              df_video_detail_folder (dataframe):
                  required column: file_name_origin_seq
          """ list_file_name_origin_seq = df_video_detail_folder [ 'file_name_origin_seq' ] . tolist ( ) str_list_file_name_origin_seq = ', ' . join ( list_file_name_origin_seq ) logging . info ( 'It may not be a problem, ' + 'but no internal folder was identified. ' + 'Check if the original files are ' + 'in the root project folder. If so, the behavior is normal: ' + f'"{file_output}: [{str_list_file_name_origin_seq}]"' ) df [ 'time_stamp' ] = pd . to_timedelta ( df [ 'time_stamp' ] , unit = 'D' ) df [ 'time_stamp_str' ] = df [ 'time_stamp' ] . apply ( timedelta_to_string ) cols_folders_start = list ( df . columns ) . index ( 'time_stamp' ) + 1 cols_folders_finish = list ( df . columns ) . index ( 'time_stamp_str' ) cols_folders = list ( df . columns ) [ cols_folders_start : cols_folders_finish ] df [ 'file_name_origin' ] = df [ 'file_name_origin' ] . apply ( get_file_name_without_extension ) df = sequencer_file_repeated ( df , 'file_name_origin' ) df [ 'file_output' ] = df [ 'file_path_output' ] df_output = df . copy ( ) cols_keep = [ 'file_name_origin' , 'file_output' , 'duration' , 'head_file' ] df_output = df_output . loc [ : , cols_keep ] df_output = df_output . drop_duplicates ( subset = 'file_output' , keep = 'first' ) df_output [ 'description' ] = '' df_output [ 'warning' ] = '' for index , row in df_output . iterrows ( ) : file_output = row [ 'file_output' ] mask_file_output = df [ 'file_output' ] . isin ( [ file_output ] ) cols_df_video_details = ( [ 'file_name_origin_seq' , 'time_stamp_str' ] + cols_folders ) df_video_details = df . loc [ mask_file_output , cols_df_video_details ] df_video_details = df_video_details . reset_index ( ) description = '' col_folder = cols_folders [ 0 ] list_folders = list ( df_video_details [ col_folder ] . unique ( ) ) for index_folder , folder in enumerate ( list_folders ) : mask_folder = df_video_details [ col_folder ] . isin ( [ folder ] ) df_video_detail_folder = df_video_details . loc [ mask_folder , : ] if folder is None : show_log_about_files_in_root_folder ( df_video_detail_folder ) folder = '' if index_folder == 0 : description = folder else : description = description + '\n\n' + folder for _ , row in df_video_detail_folder . iterrows ( ) : file_name_origin_seq = row [ 'file_name_origin_seq' ] description = ( description + '\n' + row [ 'time_stamp_str' ] + ' ' + file_name_origin_seq ) if len ( description ) > 1000 : df_output . loc [ index , 'warning' ] = 'max size reached' else : pass df_output . loc [ index , 'description' ] = description df_output = df_output . reindex ( [ 'file_output' , 'description' , 'warning' ] , axis = 1 ) return df_output
short_docstring: input sequencer for repeated file_name_origin
  In case of split origin files, will be different output files
  with the same source file name.
short_docstring_tokens: input sequencer for repeated file_name_origin In case of split origin files will be different output files with the same source file name .
comment: """Show info log, pointing the original files
              whose internal folder was not found,
              assuming they are in the root folder.
  
          Args:
              df_video_detail_folder (dataframe):
                  required column: file_name_origin_seq
          """$SEP$# create column time_stamp_str$SEP$# creat list with cols folders names$SEP$# Remove file extension in values from column file_name_origin$SEP$"""
      #input sequencer for repeated file_name_origin
       In case of split origin files, will be different output files
        with the same source file name.
        In this case, it is necessary to differentiate the name of the source
        files in the timestamp, through a numeric sequence.
        e.g.: filename_P01, filename_P02
      """$SEP$# fill columns file_output with file_path_output$SEP$# TODO: instead of filling, adapt code to work$SEP$#       with the file_path_output columns$SEP$# create dataframe description as df_output$SEP$# list of folders origin from the output file$SEP$# check for size char limit in description