Here\'s my spark code. It works fine and returns 2517. All I want to do is to print \"2517 degrees\"...but I\'m not sure how to extract that 2517 into a variable. I can only
I think you're looking for collect. Something like this should get you the value:
collect
df.collect()[0]['count(DISTINCT AP)']
assuming the column name is 'count(DISTINCT AP)'
'count(DISTINCT AP)'