# convert student ID to list using
# flatMap
print(dataframe.select('student ID').
rdd.flatMap(lambda x: x).collect())
from pyspark.sql import Row
li=[1,2,3,4]
rdd1 = sc.parallelize(li)
row_rdd = rdd1.map(lambda x: Row(x))
df=sqlContext.createDataFrame(row_rdd,['numbers']).show()