Skip to content

ENH: Aligning values to the left in printing or writing to a file #50095

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
2 of 3 tasks
dstone42 opened this issue Dec 6, 2022 · 3 comments
Closed
2 of 3 tasks

ENH: Aligning values to the left in printing or writing to a file #50095

dstone42 opened this issue Dec 6, 2022 · 3 comments
Assignees
Labels
Enhancement Needs Discussion Requires discussion from core team before further action Output-Formatting __repr__ of pandas objects, to_string

Comments

@dstone42
Copy link

dstone42 commented Dec 6, 2022

Feature Type

  • Adding new functionality to pandas

  • Changing existing functionality in pandas

  • Removing existing functionality in pandas

Problem Description

I wish I could print (console printing) or write a pandas data frame and have the values in each cell (not the column headers) aligned to the left.

Feature Description

It is default aligning to the right, and you would just have to add an option for left aligning.

Alternative Solutions

The Styler objects allow for this using CSS, but they aren't printable. If those could be printed or written to a file, that would also solve this issue.

Additional Context

No response

@dstone42 dstone42 added Enhancement Needs Triage Issue that has not been reviewed by a pandas team member labels Dec 6, 2022
@phofl phofl added the Output-Formatting __repr__ of pandas objects, to_string label Dec 11, 2022
@mwanink
Copy link

mwanink commented Apr 1, 2024

take

@20revsined
Copy link

take

@20revsined 20revsined removed their assignment May 5, 2024
@mroeschke mroeschke added Needs Discussion Requires discussion from core team before further action and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Jul 16, 2024
@mroeschke
Copy link
Member

Thanks for the request, but it appears there hasn't been much traction for this request over the years so closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Needs Discussion Requires discussion from core team before further action Output-Formatting __repr__ of pandas objects, to_string
Projects
None yet
Development

No branches or pull requests

5 participants