Home > other >  In python, whether can use spark. Read the. CSV (" CSV path ") reads the HDFS CSV file for
In python, whether can use spark. Read the. CSV (" CSV path ") reads the HDFS CSV file for

Time:11-02

In python3 interactive window, introducing pyspark package, and create SparkSession, can use spark. Read. CSV (" CSV path ") to read a CSV file format, but, if it is HDFS format CSV file is not, An error: py4j. Protocol. Py4JJavaError: An error occurred while calling o40. CSV.
Look at the python's official website, there are other ways to read HDFS file, why spark. Read. CSV (" CSV path ") this way doesn't work?