Comments (2)
@mjb-v9-5-2
Thank you for your feedback.
The problems that you described are fixed for certain values at pytablewriter 0.62.0
:
import pandas as pd
import pytablewriter as ptw
writer = ptw.UnicodeTableWriter(
dataframe=pd.DataFrame(
{"realnumber": ["0.000000000000001", "0.000000000000002"], "long": ["1,000,000,000,000", "1"]}
),
margin=1,
column_styles=[
ptw.style.Style(thousand_separator=","),
ptw.style.Style(thousand_separator=","),
]
)
writer.write_table()
┌───────────────────┬───────────────────┐
│ realnumber │ long │
├───────────────────┼───────────────────┤
│ 0.000000000000001 │ 1,000,000,000,000 │
├───────────────────┼───────────────────┤
│ 0.000000000000002 │ 1 │
└───────────────────┴───────────────────┘
However, in the case of mixed decimal place values, the problem still exists as before:
import pandas as pd
import pytablewriter as ptw
writer = ptw.UnicodeTableWriter(
dataframe=pd.DataFrame(
{"realnumber": ["0.000000000000001", "0.1"], "long": ["1,000,000,000,000", "1"]}
),
margin=1,
column_styles=[
ptw.style.Style(thousand_separator=","),
ptw.style.Style(thousand_separator=","),
]
)
writer.write_table()
┌─────────────┬───────────────────┐
│ realnumber │ long │
├─────────────┼───────────────────┤
│ 0.000000000 │ 1,000,000,000,000 │
├─────────────┼───────────────────┤
│ 0.100000000 │ 1 │
└─────────────┴───────────────────┘
I will also fix this in the future version.
from pytablewriter.
The problem fixed at pytablewriter 0.63.0
from pytablewriter.
Related Issues (20)
- Set formatting for specific cell HOT 1
- module 'dataproperty' has no attribute 'PropertyExtractor' HOT 1
- Fix Markdown table alignment row to conform to GFM HOT 4
- Header cells ignore style HOT 3
- Merged rows support
- Github Pages fail to render table HOT 5
- Incorrect AsciiDoc table header generated. HOT 1
- Trailing double quote removed from cell data HOT 2
- 0.63.0 - Quoted string quote mark not printed HOT 1
- Markdown save result as file fails HOT 2
- Prevent formatting of float strings HOT 1
- Table generation is slow, even for space aligned HOT 1
- Default thousand separator HOT 2
- Show how to write to file in examples HOT 4
- Fix code scanning alert - Overly permissive regular expression range
- [Bug] ModuleNotFoundError: No module named 'dominate' HOT 2
- New version ignores `header_list` HOT 6
- column name is only showing default A B C D ... HOT 1
- Leading zeros are missing for strings in value_matrix HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytablewriter.