Skip to content

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

@dstone42

Description

@dstone42

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

Metadata

Metadata

Assignees

Labels

EnhancementNeeds DiscussionRequires discussion from core team before further actionOutput-Formatting__repr__ of pandas objects, to_string

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions