Closed saikoneru1997 closed 2 hours ago
file_path = "/path/to/your/multiline_file.csv"
df = spark.read.option("header", "true") \ .option("multiLine", "true") \ .option("quote", "\"") \ .option("escape", "\"") \ .option("sep", ",") \ .csv(file_path)
df.show()
Define the file path
file_path = "/path/to/your/multiline_file.csv"
Load the multiline CSV into a DataFrame
df = spark.read.option("header", "true") \ .option("multiLine", "true") \ .option("quote", "\"") \ .option("escape", "\"") \ .option("sep", ",") \ .csv(file_path)
Show the loaded DataFrame
df.show()