Skip to content

ENH: Add commented_names parameter to genfromtxt #31984

Open
Aniketsy wants to merge 2 commits into
numpy:mainfrom
Aniketsy:second-oldest
Open

ENH: Add commented_names parameter to genfromtxt #31984
Aniketsy wants to merge 2 commits into
numpy:mainfrom
Aniketsy:second-oldest

Conversation

@Aniketsy

Copy link
Copy Markdown
Contributor

Fixes #389

PR summary

  • i followed @WarrenWeckesser suggestion

  • added a new commented_names option to genfromtxt so we can control exactly where it look for column names, instead of guessing based on comments.

  • set commented_names=True to grab the names from the last comment line before the data starts or commented_names=False to skip all comments

  • left the default behaviour commented_names=None unchanged

  • As its quite old issue (2012) , excited to move forward with this 😀

First time committer introduction

AI Disclosure

  • yes i've used for generating test and some improvement were suggested

So lets call this work done by Semi-human

@Aniketsy

Copy link
Copy Markdown
Contributor Author

ahh, i think this needs stub update as well, (moving in draft for now) , needs to update docstring too

@Aniketsy Aniketsy marked this pull request as draft July 13, 2026 13:23
@Aniketsy Aniketsy marked this pull request as ready for review July 14, 2026 13:39
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.

GenFromText should be able to read field names from first uncommented line

1 participant