Include space before SI-prefix
See original GitHub issueIn the SI system, prefix and units should be written after a space (see e.g.: https://en.wikipedia.org/wiki/International_System_of_Units#General_rules) I haven’t found an option to do this. The issue can be reproduced by the example below where I get a space between the prefix (e.g. k) and the unit W. Alternatively I could of course skip the space before the W, but I cannot find a way to add a space between the last digit and the SI-prefix.
import dash
import dash_table
import pandas as pd
df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/solar.csv')
app = dash.Dash(__name__)
app.layout = dash_table.DataTable(
id='table',
columns=[{'name': i, 'id': i, 'type': 'numeric', 'format': {'locale': {'symbol': ['', ' W']}, 'specifier': '$.3s'}} for i in df.columns],
data=df.to_dict('records'),
)
if __name__ == '__main__':
app.run_server(debug=True)
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (1 by maintainers)
Top Results From Across the Web
SI Unit rules and style conventions checklist
There is a space between the numerical value and unit symbol, even when the value is used in an adjectival sense, except in...
Read more >Punctuation with units - English StackExchange
The numerical value always precedes the unit, and a space is always used to separate the unit from the number. (…) The only...
Read more >SI Unit rules and style conventions
SI Unit rules and style conventions. An object and any quantity describing the object are distinguished. (Note the difference between "surface" and "area,"....
Read more >No space after number for metric units? - Customer Support
"The International System of Units (SI) recommends inserting a space between a number and a unit of measurement units and between units in ......
Read more >How to Use SI Units in Technical Writing - AJE
These symbols are not abbreviations, so periods are not required. Additionally, a space should always be included between a number and the SI...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For future reference, just in case I get an answer there, here is a question I posted in SO about this topic.
@Peque No, I haven’t 🙄 Ended up writing the unit in the column headers (e.g. W) and living with the e.g. 1.3M for the table values…
But yes, I’m a bit surprised myself 😅 Would also have been nice to be able to set SI as the overall standard format for an app. Annoying with e.g. B popping up instead of G for 1e9 if you haven’t remembered to specify the SI syntax.