Hi,
I'm having a problem where I have so many columns I want to select, but I don't want to type all of them out to create a new subset of them.
What I have is 200 columns that all start with the same string. I was wondering if there is a way I can select these columns with a loop or some command.
I have tried using the line:
cols = dt << Get Column Names(Starts With("Year"));
But if just gets every column name, and I do have a few columns that do not start with "Year" or even have "Year" in the name. Right now I'm making a new subset of the columns I want with:
dt2 = dt << Subset(
All rows,
columns(
:Time,
:Day,
:Name("Year 1"),
:Name("Year 2"),
:Name("Year 3"),
.
.
.
etc.
),
output table name("All Years")
);
There are many other columns in my table, but I just want to separate out these. Please help!