You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by AlexModestov <Al...@gmail.com> on 2016/03/10 10:24:19 UTC
sql functions: row_number, percent_rank, rank,rowNumber
Hello all,
I try to use some sql functions.
My task to renumber rows in DataFrame.
I use sql functions but they don't work and I don;t understand why.
I would appreciate you help to fix this issue.
Thank you!
The piece of my code:
"from pyspark.sql.functions import row_number, percent_rank, rank,
randn,rowNumber
res_sorted.select(rowNumber()).head(10)"
res_sorted - is a sorted dataframe.
The error is:
"AnalysisException: u"unresolved operator 'Project ['row_number() AS
'row_number()#2848];""
--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/sql-functions-row-number-percent-rank-rank-rowNumber-tp26448.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org