I am pretty new to Python so I don't really anycodings_apache-spark know how to track this down. With this error: TypeError: type NoneType doesn't define _round_ method Round_half_even(f.lit(17.45)).alias('V_COST_TOTAL_CALC')īut this version which actually does anycodings_apache-spark rounding fails: round_half_even(number): I am simply calling the udf in a select on a anycodings_apache-spark dataframe, like this: df1 = spark.read. ![]() ![]() Here is my udf as anycodings_apache-spark it works: round_half_even(number): If it does anything else, anycodings_apache-spark I get an obscure error. The problem anycodings_apache-spark is if I simply return the value passed in, anycodings_apache-spark the build works. I am trying to implement a pyspark function anycodings_apache-spark to perform half-even rounding.
0 Comments
Leave a Reply. |