Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Cloud Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Cloud.
SOLVED

How to delete the first row of a data set and use the second row for column labels.

Hi,

 

I'm very new to Trifacta. It seems like it should be easy to delete the first row of a data set (CSV or Excel) and use the second row as the column labels but I am having a hard time solving the issue. So far all I can seem to do is import the file without structure, set the second row as the labels and then use some conditional statement to remove the first row. This just seems very inelegant if for example a user wanted to always remove the first x number of rows regardless of their contents.

 

Sorry for the basic question.

 

Thanks,

Greg

3 REPLIES 3
Trifacta_Alumni
Alteryx Alumni (Retired)

Good question @Greg Nolder? 

 

If you click on the dot . that shows the Row number and Source row number on the left side of the screen, you'll see some suggestions on the right. In this data, you might wanna delete this rouge row. So choose Delete rows suggestion and Add step.

 

 

let's say row number 3 is our expected column header. So do the same mouse actions as explained above. Click the dot . and you'll see a Header transform suggestion to covert this row to header.

Notice the preview in both cases. Delete row highlights the row in red and Header transform puts the highlighted row as the data header.

 

 

Another cool thing about these suggestions are if i perform a series of mouse selections like in this case i clicked row 3 and row 1, Trifacta made a great assumption that - do i want to rename the headers based on the row values? So i can think of creating a header like col1_aa, col2_ee, col_ii etc using the first suggested transform.

 

Hope this helps.

 

Best

Vardan

 

Hi @Vardan Negi? ,

 

Thank you very much for the fast reply. This indeed answers my question.

 

Cheers,

Greg

Trifacta_Alumni
Alteryx Alumni (Retired)

No problem. My pleasure.