def rename_vectors name_map
      existing_targets = name_map.reject { |k,v| k == v }.values & vectors.to_a
      delete_vectors(*existing_targets)

      new_names = vectors.to_a.map { |v| name_map[v] ? name_map[v] : v }
      self.vectors = Daru::Index.new new_names
    end
def rename_vectors name_map
      existing_targets = name_map.reject { |k,v| k == v }.values & vectors.to_a
      delete_vectors(*existing_targets)

      new_names = vectors.to_a.map { |v| name_map[v] ? name_map[v] : v }
      self.vectors = Daru::Index.new new_names
    end
Renames the vectors

 == Arguments

 * name_map - A hash where the keys are the exising vector names and
              the values are the new names.  If a vector is renamed
              to a vector name that is already in use, the existing
              one is overwritten.

 == Usage

   df = Daru::DataFrame.new({ a: [1,2,3,4], b: [:a,:b,:c,:d], c: [11,22,33,44] })
   df.rename_vectors :a => :alpha, :c => :gamma
   df.vectors.to_a #=> [:alpha, :b, :gamma]