spark = SparkSession.builder.getOrCreate()
sc = spark.sparkContext
ssc = StreamingContext(sc , 10)
rdd = ssc.sparkContext.parallelize(pd_binance)
rdd.take(1)
Here is a small portion of the result:
[['0.02703300', '1.30900000'],
['0.02703300', '0.61800000'],
['0.02704600', '3.90800000'],
['0.02704700', '4.00000000'],
['0.02704700', '7.44600000']
And I want to get the max and minimum value for each key, how?
You can use
reduceByKey: