How do I remove the ".000000" part of the "2386.000000" field? I want to leave only the numerical part before the dot in databricks
How do I remove the ".000000" part of the "2386.000000" field? I want to leave only the numerical part before the dot in databricks
There are many ways to convert a float to an int. The cast() function is just one.
Please see the following link for all supported Spark SQL functions.
https://spark.apache.org/docs/2.3.0/api/sql/index.html#round
In my solution, I use the round() function. As long as you get the correct answer, the path you take may differ.