Learning SAS? Welcome to the exclusive online community for all SAS learners.

How to replace column header with dat in first row

Reply
New Contributor
Posts: 3

How to replace column header with dat in first row

I need to move the data from first row into the column header. Can you please let me know a shortcut that I can use to move the data from first row into the column header? Thanks

PROC Star
Posts: 7,656

Re: How to replace column header with dat in first row

[ Edited ]

Provide an example of what your file currently looks like (preferably in the form of a data step).

 

One general method can be found at: https://communities.sas.com/t5/SAS-Procedures/rename-the-column-attributes-from-the-first-row-values...

 

Art, CEO, AnalystFinder.com

 

New Contributor
Posts: 3

Re: How to replace column header with dat in first row

Move the first row values into the column header.PNG

I need to move first row as column header (say move value "3" in the position of "A 1")

 

Super User
Posts: 20,731

Re: How to replace column header with dat in first row

It’s probably worth explaining what you’re trying to do here. 

 

Is that a screenshot from SAS? How did you import your data in the first place? Is there a possibility of fixing it there instead?

 


Josi17 wrote:

Move the first row values into the column header.PNG

I need to move first row as column header (say move value "3" in the position of "A 1")

 


 

Ask a Question
Discussion stats
  • 3 replies
  • 188 views
  • 0 likes
  • 3 in conversation