How do you change the column name to what's in the top row?

I have a table where the column names are blank. I’d like to be able to change the column names to what’s in the top/first row for each/multiple column. Is there a transformation to do this?

Hi @David_Chin - Happy to help! There are a few ways that you can do this!

If those column names are blank in the data that you are pulling in: our Pull from CSV, Pull from Excel, and Pull from Google Sheets steps all have Advanced options that will allow you to set a number of rows to skip. You can set them to skip the first row which will remove that blank row and set the 2nd row as the column headers.

If this is happening later in your Flow, you can use the steps in this snippet to remove those blank headers and replace them with the first row of data:


How to use a snippet.

The steps in the snippet will Flip the table so the current header row will become a column that you will then remove with an Edit columns step. Once that column of blank headers has been removed, you can Flip the table again and the first row of your data will be the new headers.

Screen Shot 2023-08-04 at 9.25.10 AM

Let me know if you have any questions!