Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
style.set_precision(0) displays spurious .0 #12134
Comments
jreback
added Bug Output-Formatting IO HTML Difficulty Novice Effort Low
labels
Jan 25, 2016
jreback
added this to the
Next Major Release
milestone
Jan 25, 2016
|
looks a bit buggy, want to do a PR? |
|
Okay, I guess the Jinja2 docs recommend to do this by changing this to something like this:
Okay to put another branch like this into the inner loop? |
|
I think that is ok, the rendering time is not usually an issue (unless you are rendering millions of lines, which itself is an issue anyhow). |
xflr6
referenced
this issue
Jan 25, 2016
Closed
BUG: style.set_precision(0) displays spurious .0 #12137
|
|
|
Sorry, I didn't see this until now. I've got branch that is changing how the display formatting works, which is going to conflict with your PR in #12137. I believe I've fixed this bug in the change (here if you want to take a look at the relevant bit). I'm going to clean that up and submit sometime this week. It boils down to using formatting like In [4]: '{:0g}'.format(100.0)
Out[4]: '100'when your precision is 0 |
|
No problem, more control over formatting is nice, stepping back. Does this unify rendering of NaNs (IIRC df.style displays |
jreback
modified the milestone: 0.18.0, Next Major Release
Jan 28, 2016
TomAugspurger
added a commit
to TomAugspurger/pandas
that referenced
this issue
Feb 7, 2016
|
|
TomAugspurger |
aee0d90
|
TomAugspurger
added a commit
to TomAugspurger/pandas
that referenced
this issue
Feb 12, 2016
|
|
TomAugspurger |
a3c38fe
|
jreback
closed this
in cf8b7f8
Feb 12, 2016
HHammond
added a commit
to HHammond/pandas
that referenced
this issue
Feb 13, 2016
|
|
TomAugspurger + HHammond |
a15248a
|
xflr6 commentedJan 25, 2016
The expected display format would be as in [2]:
