Convert pandas dataframe to spark dataframe. createDataFrame(df) StructType is represented as a pandas.