Skip to content
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

ENH: Adding new pandas option for integer formatting, Issue#57177 #58519

Closed
wants to merge 8 commits into from

Conversation

Meadiocre
Copy link

Modified the IntArrayFormatter class and added a new display option to format integers with a delimiter in DataFrames. The default value for the delimiter is '' and user have the option of using ',' or '' for integer separator. Note this change does not affect float or complex numbers.

@Meadiocre Meadiocre requested a review from Dr-Irv as a code owner May 2, 2024 00:23
@@ -95,6 +95,7 @@
CompressionOptions,
FilePath,
FloatFormatType,
IntegerFormatType,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised this worked because _typing.py has no IntegerFormatType

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh did not notice that until I created a PR, just pushed something that fixes that.

@mroeschke mroeschke added the Output-Formatting __repr__ of pandas objects, to_string label May 2, 2024
@Meadiocre
Copy link
Author

@Dr-Irv Any idea why I am getting this precommit error? I ran "pre-commit run --hook-stage manual --all-files" locally with no errors but I am getting one when I push my changes.

image

@Dr-Irv
Copy link
Contributor

Dr-Irv commented May 6, 2024

@Dr-Irv Any idea why I am getting this precommit error? I ran "pre-commit run --hook-stage manual --all-files" locally with no errors but I am getting one when I push my changes.

image

If you look at the output of the CI check here (https://results.pre-commit.ci/run/github/858127/1714714926.f5LU8a9SRWKOAlR2F43xpQ), that will indicate the issue. I'm not sure if the pre-commit checks run locally are the same as run in CI.

@Meadiocre
Copy link
Author

@Dr-Irv Forgot to mention that I looked at that which lead me to post the comment. Just could not figure out what this error meant. Tried to see if this ruff-format ran locally so that I could commit the file that was reformatted, but it did not happen.

image

@Dr-Irv
Copy link
Contributor

Dr-Irv commented May 6, 2024

@Dr-Irv Forgot to mention that I looked at that which lead me to post the comment. Just could not figure out what this error meant. Tried to see if this ruff-format ran locally so that I could commit the file that was reformatted, but it did not happen.

image

Make sure you do the following:

  1. Merge with upstream/main
  2. Update your environment, e.g., mamba env update --file environment.yml
  3. Update the pre-commit hooks: pre-commit install

I did this, edited a file that I knew would get fixed by ruff-format, and it was invoked when committing that file.

@mroeschke
Copy link
Member

Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in the main branch, address any review comments and/or failing tests, and we can reopen.

@mroeschke mroeschke closed this May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Output-Formatting __repr__ of pandas objects, to_string
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ENH: Expose integer formatting also for default display, not only styler
3 participants