Download pyspark - inferSchema in spark csv package - Stack Overflow book pdf free download link or read online here in PDF. Read online pyspark - inferSchema in spark csv package - Stack Overflow book pdf free download link book now. All books are in clear copy here, and all files are secure so don't worry about it. This site is like a library, you could find million book here by using search box in the header.
I suggest you use the function '.load' rather than '.csv', something like this: data = sc.read.load(path_to_file, format='com.databricks.spark.csv', header='true', inferSchema='true').cache() Of you course you can add more options. Then you can simply get you want: data.columns Another way of doing this (to get the columns) is to use it this way: data = sc.textFile(path_to_file) And to get the headers (columns) just use data.first() Looks like you are trying to get your schema from your csv ...
Read : pyspark - inferSchema in spark csv package - Stack Overflow pdf book online Select one of servers for direct link: |
---|