def batch_slice_columns(slice_columns)
      use_indexes = []
      headers.values.each_with_index do |val, index|
        use_indexes << index if val.in?(slice_columns)
      end
      return csv_lines if use_indexes.empty?
      # slice CSV headers
      @headers = headers.to_a.values_at(*use_indexes).to_h
      # slice CSV values
      csv_lines.map! do |line|
        line.values_at(*use_indexes)
      end
    end
def batch_slice_columns(slice_columns)
      use_indexes = []
      headers.values.each_with_index do |val, index|
        use_indexes << index if val.in?(slice_columns)
      end
      return csv_lines if use_indexes.empty?
      # slice CSV headers
      @headers = headers.to_a.values_at(*use_indexes).to_h
      # slice CSV values
      csv_lines.map! do |line|
        line.values_at(*use_indexes)
      end
    end
Use it when CSV file contain redundant columns

 Example:

 ActiveAdmin.register Post
   active_admin_import before_batch_import: lambda { |importer|
                         importer.batch_slice_columns(['name', 'birthday'])
                       }
 end