pyspark type error on reading a pandas dataframe
问题 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