Skip to content

Remove embedded blank lines from assistivetext field in published_images.csv - #32

Open
alwaysalearner1234 wants to merge 1 commit into
NationalGalleryOfArt:mainfrom
alwaysalearner1234:main
Open

Remove embedded blank lines from assistivetext field in published_images.csv#32
alwaysalearner1234 wants to merge 1 commit into
NationalGalleryOfArt:mainfrom
alwaysalearner1234:main

Conversation

@alwaysalearner1234

Copy link
Copy Markdown

Fix

Replaced every \n\n within assistivetext values with a single space,
collapsing each affected record to a single physical CSV line.

  • No text content was removed or altered — only the paragraph separator was collapsed
  • Internal double-quote escaping ("") was already correct — no changes needed there
  • Commas within the field were already properly enclosed in double quotes — no changes needed

Scope

File changed data/published_images.csv
Records scanned 129,098
Records fixed 139 (all with the same root cause)
Column count before/after 13 / 13 ✅
Rows with wrong column count 0 / 0 ✅
Remaining \n\n in file 0

Validation

Validated using Python's csv.reader (RFC 4180 compliant) on the final file.
All 129,098 rows parse to exactly 13 columns with no errors.
Fixes #28

…images.csv

139 records had paragraph breaks (\n\n) embedded inside the quoted
assistivetext field, causing many CSV parsers to split records across
blank lines and report column-count errors.

Fix: replace every \n\n in assistivetext values with a single space.
No text content was altered; only the paragraph separator was collapsed.

Reported record: uuid=00671f8f-92aa-46cc-959b-3a7c5c7cd085
                 depictstmsobjectid=139738

Total records fixed: 139 / 129098
Column count before and after: 13 (unchanged)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

malformed data when pulling published_images CSV

1 participant