data = [{'student_id': 12, 'name': 'sravan', 'address': 'kakumanu'},
{'student_id': 14, 'name': 'jyothika', 'address': 'tenali'},
{'student_id': 11, 'name': 'deepika', 'address': 'repalle'}]
# creating a dataframe
dataframe = spark.createDataFrame(data)