Issue trying to get a value from a DataFrame
I'm using pyspark in Databricks, I'm trying to get the amount of rows as a value to do some calculation
What I did:
f=sqlContext.sql('SELECT COUNT(*) AS COUNTF FROM SOOMLA')
#It´s a dataframe
Now I want to get this number into the DataFrame as a value to make calculation, I tried already:
f['COUNTF'].iloc[0]
but I got:
Out[158]: Column<b'COUNTF[iloc][0]'>
How can I get this 439016392 as a value?