Spark 2.4.4:

I want to import a CSV file, but there are two options. Why is that? And which one is better? Which one should I use?

```py
from pyspark.sql import SparkSession

spark = SparkSession \
    .builder \
    .master("local[2]") \
    .config('spark.cores.max', '3') \
    .config('spark.executor.memory', '2g') \
    .config('spark.executor.cores', '2') \
    .config('spark.driver.memory','1g') \
    .getOrCreate()

```

Option 1
========

```py
df = spark.read \
    .format("com.databricks.spark.csv") \
    .option("header", "true") \
    .option("inferSchema", "true") \
    .load("data/myfile.csv")

```

Option 2
========

```py
df = spark.read.load("data/myfile.csv", format="csv", inferSchema="true", header="true")

```