Skip to content

QST: need to refactor pandas/io/formats/latex.py? #35790

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
ivanovmg opened this issue Aug 18, 2020 · 2 comments
Closed

QST: need to refactor pandas/io/formats/latex.py? #35790

ivanovmg opened this issue Aug 18, 2020 · 2 comments
Labels
Milestone

Comments

@ivanovmg
Copy link
Member

Refactoring

Recently pandas/io/formats/latex.py undertook some updates and extension of it functionality.
Adding more into it led to some code smell.

Recently there was a refactoring done by @SylvainLan, PR #35649.
Even after that I see some improvements that can be done.

  1. Split the process of writing the table into the beginning of the environment, the body and end of the environment.
  2. Implement polymorphism to smoothly handle transition from regular table to longtable (currently there are multiple ifs here and there).

I made some changes in the local branch (not in sync with master because of the recent refactoring).
See https://github.com/ivanovmg/pandas/tree/refactor/latex-formatting for the preliminary solution.

Would you be interested in following this direction?
If so, then I would make it in sync with master and continue improvements.

@ivanovmg ivanovmg added Needs Triage Issue that has not been reviewed by a pandas team member Usage Question labels Aug 18, 2020
@jreback
Copy link
Contributor

jreback commented Aug 18, 2020

always +1 on code cleanups :)

@simonjayhawkins simonjayhawkins added Clean IO LaTeX to_latex and removed Needs Triage Issue that has not been reviewed by a pandas team member Usage Question labels Aug 18, 2020
@jreback jreback added this to the 1.2 milestone Aug 27, 2020
@ivanovmg
Copy link
Member Author

ivanovmg commented Sep 8, 2020

Closed as the PR #35872 was merged.

@ivanovmg ivanovmg closed this as completed Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants