question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Newline characters lead to broken CSV

See original GitHub issue

Overview

When reading an html table that includes \n characters inside a cell, converting to CSV produces broken files.

from frictionless import Resource
from frictionless.plugins.html import HtmlDialect

resource = Resource(path="data/table-with-newline-characters.html", dialect=HtmlDialect(selector="#id"))
resource.write(path="data/table-data.csv")

Please preserve this line to notify @roll (lead of this repository)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
n0rdlichtcommented, Jun 15, 2021

Thank. Let me know if you need sample files/links.

1reaction
rollcommented, Jun 15, 2021

Thanks @n0rdlicht, I’ll investigate

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adding a newline character within a cell (CSV) - Stack Overflow
I would like to import product descriptions that need to be logically broken according by things like description, dimensions, finishes ...
Read more >
Line breaks in text fields - A Beginner's Guide to Clean Data
Since the line break \n is almost always used as a row terminator, it has a special meaning in CSV files and can...
Read more >
Common Format Type for Comma-Separated Values (CSV ...
If you upload a CSV file that contains new line characters in the fields other than Text Area Field, it will be saved...
Read more >
How to store strings in CSV with new line characters?
The main trick. This is to replace the \n characters before writing with a weird character that otherwise wouldn't be included, then to...
Read more >
Importing CSV with line breaks - Microsoft Community
Open the CSV with the content above in the excel · Select the first column(column A) · Click on Text to Columns ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found