I open several "csv" files in Spark 2.2, but when I do a "count" it returns 10000000 of records when in reality it is 6000000 of records, when I check it with Pandas in python or Alteryx it gives the correct number.
scala> val df=spark.read.format("com.databricks.spark.csv").option("header", "true").option("inferSchema","true").option("encoding", "UTF-8").load("/detalle/*.csv")
df: org.apache.spark.sql.DataFrame = [KEY: string, UNIQ: string ... 101 more fields]
scala> df.count
res13: Long = 10093371