I'm trying to read a large (~20 GB) csv file into Spark. The file has one field containing text with new line characters (\n), and the text is not wrapped in quotes. There is a pipe delimiter in the file ("|") indicating when a new row begins. I can read this file in pandas using the following code, but I would like either a pyspark or sparklyr solution. Is this possible?

```
read_file = pd.read_table(
    './filepath/file.csv', 
    engine = 'c',
    lineterminator="|",
    names=['text'],
    encoding ='latin1',
    nrows = 2_000
)

```

Output should look like this (in the raw file there is a pipe after the last "\r\n"):
[Pandas output](https://i.stack.imgur.com/0w8VK.png)