The others have shown you how to create a Hash with a block to provide
a default value. Another way to program this is to say:

File.open("Sector_brand.csv").each_line do |lines|
  values = lines.split(",")
  (h[values[0]] ||= []) << values[1]
end

...or the equivalent using one of the CSV libraries.

Clifford Heath.