Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
"\t" と "," の 2 つの区切り記号を持つ奇妙な CSV ファイルがあります。
以前は で解析してCSV.parse("file", col_sep: "\t")いましたが、今ではフィールドも「,」で区切る必要があります。
CSV.parse("file", col_sep: "\t")
それを達成する方法はありますか?
これを試して:
CSV.parse(File.read('csvfile').gsub("\t", ","), col_sep: ',')