I have a CSV and 2 file headers I want to change.
"h1","h2","h3","h4"
"d1","d2","d3","d4"
csv = CSV.read(file,headers:true)
How can I find, for example, "h3" and change it's name to "header3"?
I have a CSV and 2 file headers I want to change.
"h1","h2","h3","h4"
"d1","d2","d3","d4"
csv = CSV.read(file,headers:true)
How can I find, for example, "h3" and change it's name to "header3"?
I found an answer, and why this isn't a function in the CSV library; it can be done with File and gsub.
How to search file text for a pattern and replace it with a given value