original_docstring: Remove root folders columns.
          Since each folder level has been divided into a column,
          a root folder column is one whose value does not change
          for all files in the project.
  
      Args:
          df (dataframe): table in analysis
          skip_cols (int): number of initial columns that are not about
                            folders structure
      
docstring: Remove root folders columns.
  Since each folder level has been divided into a column,
  a root folder column is one whose value does not change
  for all files in the project.
docstring_tokens: Remove root folders columns . Since each folder level has been divided into a column a root folder column is one whose value does not change for all files in the project .
code: def remove_root_folders(df, skip_cols):
      """Remove root folders columns.
          Since each folder level has been divided into a column,
          a root folder column is one whose value does not change
          for all files in the project.
  
      Args:
          df (dataframe): table in analysis
          skip_cols (int): number of initial columns that are not about
                            folders structure
      """
  
      def check_col_unique_values(serie):
  
          serie_unique = serie.drop_duplicates(keep='first')
          list_unique_values = serie_unique.unique().tolist()
          qt_unique_values = len(list_unique_values)
          if qt_unique_values == 1:
              return True
          else:
              return False
  
      len_cols = len(df.columns)
      list_n_col_to_delete = []
      for n_col in range(skip_cols, len_cols-1):
          serie = df.iloc[:, n_col]
          # check for column with more than 1 unique value (folder root)
          col_has_one_unique_value = check_col_unique_values(serie)
          if col_has_one_unique_value:
              name_col = df.columns[n_col]
              list_n_col_to_delete.append(name_col)
  
      df = df.drop(list_n_col_to_delete, axis=1)
  
      return df
code_tokens: def remove_root_folders ( df , skip_cols ) : def check_col_unique_values ( serie ) : serie_unique = serie . drop_duplicates ( keep = 'first' ) list_unique_values = serie_unique . unique ( ) . tolist ( ) qt_unique_values = len ( list_unique_values ) if qt_unique_values == 1 : return True else : return False len_cols = len ( df . columns ) list_n_col_to_delete = [ ] for n_col in range ( skip_cols , len_cols - 1 ) : serie = df . iloc [ : , n_col ] col_has_one_unique_value = check_col_unique_values ( serie ) if col_has_one_unique_value : name_col = df . columns [ n_col ] list_n_col_to_delete . append ( name_col ) df = df . drop ( list_n_col_to_delete , axis = 1 ) return df
short_docstring: Remove root folders columns.
short_docstring_tokens: Remove root folders columns .
comment: """Remove root folders columns.
          Since each folder level has been divided into a column,
          a root folder column is one whose value does not change
          for all files in the project.
  
      Args:
          df (dataframe): table in analysis
          skip_cols (int): number of initial columns that are not about
                            folders structure
      """$SEP$# check for column with more than 1 unique value (folder root)