May-12-2018, 03:04 PM
test.groupBy('symbol','tradingDay',Window('timestamp','5 min')).agg({'open':'first','high':'max','low':'min','close':'last','volume':'sum'}).withColumnRenamed('first(open)',"Open").withColumnRenamed('max(high)',"High").withColumnRenamed('min(low)',"Low").withColumnRenamed('last(close)',"Close").withColumnRenamed('sum(volume)',"Volume").show()
When running the above code getting below error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: object() takes no parameters
My actual task is to display max or min data in 5 min window interval
Kindly help
When running the above code getting below error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: object() takes no parameters
My actual task is to display max or min data in 5 min window interval
Kindly help