Griz2 Posted May 10, 2023 Share Posted May 10, 2023 Sometimes the data will have a column called "XYZ" and other times the column will be called "ABC". Is there a way to check for a column in an ifelse statement or maybe column position in an import from Excel and then rename or in a DataMan? Any clever ideas? Want to know more? Link to comment Share on other sites More sharing options...
Enrico Posted May 12, 2023 Share Posted May 12, 2023 Hi Griz, yes, there are multiple way to perform the changes of the attributes name using a formula, the one that I suggest you is the following. Let's take as example a data set containing 3 attributes: CLIMBER, name of the climber Best Sport, the highest sport grade reached by the athlete Best Boulder, the highest boulder grade reached by the athlete You decide that "Best" is not representative enough and you want to change the names of all the attributes containing "Best" by replacing "Best" with "Highest". To do that you need to: Insert $names on the left side of the formula Insert the formula that you want to use on the right side, in this case: ifelse(find ($names, "Best") == 1, replace ($names, "Best", "Highest"), $names) I hope it will be useful to you 1 Want to know more? Link to comment Share on other sites More sharing options...
Griz2 Posted May 13, 2023 Author Share Posted May 13, 2023 WOW! That worked perfectly. Thank you. Where would I find in the documentation the $names formula? What exactly is the $names? Want to know more? Link to comment Share on other sites More sharing options...
Sara Posted May 19, 2023 Share Posted May 19, 2023 Hello Griz, thank you for opening this topic on our Community. By specifying the $names parameter in the left-hand side member of the formula bar in the Data Manager task, you can bulk edit the dataset's attributes' headers. You can find more information about this specific use case on the technical documentation at the following link: Computing Formulas in the Data Manager (rulex.ai). If you need further clarification, don't hesitate to contact us! Have a wonderful weekend. Want to know more? Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.