I have the below Pyspark dataframe with Column_1 as string
S.No. Column_1
1 1.0
2 1.0
3 2.0
4 N
5 N
6 3.0
7 N
I have to convert the numbers in column 1 from 1.0, 2.0 etc to just 1 or 2 or 3. I have to truncate the decimal places. I cannot cast it into int because it has string values too.
Expected Output:
S.No. Column_1
1 1
2 1
3 2
4 N
5 N
6 3
7 N