I have a pyspark dataframe column where there are mix of values like some are string and some are numbers like below -
Source_ids
abc_123
1234.0
345
abc_cad
K-123
540.0
456.0
I want to remove the decimal part wherever it is coming. So result should be
Source_ids
abc_123
1234
345
abc_cad
K-123
540
456
We can not make this column long type since it has text also. How can I achieve it?