【发布时间】:2021-12-10 23:26:58
【问题描述】:
我正在尝试执行以下代码:
df2.groupBy(df2.item_type,df2.product_id)\
.count()\
.where(f.col('row' =<3))\
.withColumn('row',f.row_number().over(\
Window.partitionBy("item_type")\
.orderBy(f.col('count')))).show()
但是我遇到了这个错误:TypeError: '
【问题讨论】:
-
这里出了点问题,
.where(f.col('row' =<3))。