Find out data type of a specific cell

Hi @r_jain ,

As @iCFO knows, I do very occasionally ( :thinking: ) like writing a component, so I thought I’d take this opportunity to see if my Multi-Column ā€œRule Engineā€ component would be able to assist with your question.

… and no this isn’t a late April Fool! :wink:


This isn’t intended necessarily to answer your question, although of course I hope it might be of use… but I thought it an interesting use case that could test and demonstrate the component.

I’ve used it here to show which of the string columns in each ā€œbad rowā€ contains non-numerics.

In this example, a demo table contains some letters in place of numbers:

There are also some non-string columns of data types that would make processing this in String Manipulation (Multi Column) problematic.

The non-numerics are detected using a regex which is designed (if chatgpt got it right, lol) to handle numerics including signed and unsigned integers, floating point and scientific notation, and as you can see from the rule below, it is predominantly the Rule Engine syntax (it of course uses a core Rule Engine behind the scenes!), but borrows the ā€œcurrentcolumnā€ idea from the String Manipulation (Multi Column) node:

NOT $CURRENTCOLUMN$ MATCHES "[-+]?\d*\.?\d+([eE][-+]?\d+)?" => "NON-NUMERIC"

The demonstration workflow can be found here:

further info

2 Likes