Skip to content

TST/REF: splitting pandas/io/parsers.py into multiple files #38930

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
arw2019 opened this issue Jan 3, 2021 · 1 comment · Fixed by #39217
Closed

TST/REF: splitting pandas/io/parsers.py into multiple files #38930

arw2019 opened this issue Jan 3, 2021 · 1 comment · Fixed by #39217
Labels
Clean Internals Related to non-user accessible pandas implementation IO CSV read_csv, to_csv Needs Discussion Requires discussion from core team before further action
Milestone

Comments

@arw2019
Copy link
Member

arw2019 commented Jan 3, 2021

pandas/io/parsers.py is close to 4k LOC (3986 on 1.3 master). Would it be reasonable to split it into multiple files (located, say, in a pandas/io/parsers directory)?

AFAICT the file contains 4 logical pieces:

  • read_... methods (~700 LOC)
  • ParserBase and related module-level methods ( ~1100 LOC)
  • CParser and related module-level methods (~400LOC)
  • PythonParser, its derived classes and related module-level methods (~1800 LOC)

Once #38370 goes in these would be joined by

  • PyarrowParser (~100 LOC right now)

IMO this kind of refactor would make the module somewhat easier to grok

@arw2019 arw2019 added Bug Needs Triage Issue that has not been reviewed by a pandas team member Clean IO CSV read_csv, to_csv Internals Related to non-user accessible pandas implementation Needs Discussion Requires discussion from core team before further action and removed Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Jan 3, 2021
@jreback
Copy link
Contributor

jreback commented Jan 3, 2021

sure seems reasonable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Internals Related to non-user accessible pandas implementation IO CSV read_csv, to_csv Needs Discussion Requires discussion from core team before further action
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants