title: NULL values when trying to import CSV in Azure Databricks DBFS
body: <p>I'm trying to import a CSV file that has no headers into DBFS for Azure Databricks, but, no matter whether I use the UI or try to do it by code, the output shows null values for all the four columns.</p>
  <p>Here's the code I ran:</p>
  <pre><code>from pyspark.sql.types import *
  
  # File location and type
  file_location = &quot;/FileStore/tables/sales.csv&quot;
  file_type = &quot;csv&quot;
  
  # Options
  
  delimiter = &quot;,&quot;
  
  customSchema = StructType([\
      StructField(&quot;id&quot;, StringType(), True),\
      StructField(&quot;company&quot;, IntegerType(), True),\
      StructField(&quot;date&quot;, TimestampType(), True),\
      StructField(&quot;price&quot;, DoubleType(), True)])
  
  # Dataframe from CSV
  df = spark.read.format(file_type) \
      .schema(customSchema) \
      .option(&quot;sep&quot;, delimiter) \
      .load(file_location)
  
  display(df)
  </code></pre>
  <p>And the output I get is:</p>
  <p><a href="https://i.stack.imgur.com/9dPjJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9dPjJ.png" alt="Databricks Output" /></a></p>
  <p>What is happening here? If I don't define any schema it loads the data perfectly, but then I don't have the chance neither to specify the headers nor to specify datatypes.</p>