I have a dataframe (input_dataframe), which looks like as below:
id test_column 1 0.25 2 1.1 3 12 4 test 5 1.3334 6 .11 I want to add a column result, which put values 1 if test_column has a decimal value and 0 if test_column has any other value. data type of test_column is string. Below is the expected output:
id test_column result 1 0.25 1 2 1.1 1 3 12 0 4 test 0 5 1.3334 1 6 .11 1 Can we achieve it using pySpark code?