I read some CSV file into pandas, nicely preprocessed it and set dtypes to desired values of float, int, category. However, when trying to import it into spark I get the following error:
Can not merge type <class 'pyspark.sql.types.DoubleType'> and <class 'pyspark.sql.types.StringType'>
After trying to trace it for a while I some source for my troubles -> see the CSV file:
"myColumns"
""
"A"
Red into pandas like: small = pd.read_csv(os.path.expanduser('myCsv.csv'))
And failing to import it to spark with:
sparkDF = spark.createDataFrame(small)
Currently I use Spark 2.0.0