File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -408,11 +408,11 @@ def when(condition, value):
408408def log (col , base = math .e ):
409409 """Returns the first argument-based logarithm of the second argument.
410410
411- >>> df.select(log(df.age, 10.0).alias('ten')).map(lambda l: round (l.ten, 5) ).collect()
412- [0.30103, 0.69897]
411+ >>> df.select(log(df.age, 10.0).alias('ten')).map(lambda l: str (l.ten)[:7] ).collect()
412+ ['0.30102', ' 0.69897' ]
413413
414- >>> df.select(log(df.age).alias('e')).map(lambda l: round (l.e, 5) ).collect()
415- [0.69315, 1.60944 ]
414+ >>> df.select(log(df.age).alias('e')).map(lambda l: str (l.e)[:7] ).collect()
415+ ['0.69314', '1.60943' ]
416416 """
417417 sc = SparkContext ._active_spark_context
418418 jc = sc ._jvm .functions .log (base , _to_java_column (col ))
You can’t perform that action at this time.
0 commit comments