Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

CSVDocumentCleaner silently discards data for negative ignore counts

Closed Beginner friendly
#13,074 0 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@julian-risch is already working on this.

Since Oct 8, 2026.

  • #13088 by @Premvkmishra — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
data

Research direction

Start at the CSVDocumentCleaner entry point and run the supplied reproduction for negative ignore_rows and ignore_columns. Trace where these values reach pandas positional slicing, then add validation while preserving current zero and positive behavior. Done means negative counts raise ValueError and regression tests cover all three cases.

Written by the indexing model from the issue text.

Description

CSVDocumentCleaner accepts negative ignore_rows and ignore_columns. These values reach pandas positional slicing and can silently discard data.

Reproduction on a main snapshot downloaded on 2026-10-02:

from haystack import Document
from haystack.components.preprocessors import CSVDocumentCleaner

document = Document(content='A,B\n1,2\n3,4\n')
for options in ({'ignore_rows': -1}, {'ignore_columns': -1}):
    result = CSVDocumentCleaner(**options).run(documents=[document])
    print(options, repr(result['documents'][0].content))

Observed output:

{'ignore_rows': -1} '3,4\n'
{'ignore_columns': -1} 'B\n2\n4\n'

I expected negative counts to raise ValueError, while zero and positive counts retain their current behavior. I have a local patch for validation, regression tests, documentation, and a release note. Would this change be welcome? I would like to contribute the fix.

AI assistance was used to prepare this report and the local patch.

Dominant language
Python
Stars
26.8k
Forks
3.3k
Avg merge
1d 13h
Merged PRs (30d)
258

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from deepset-ai/haystack

All issues in deepset-ai/haystack

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.