Comments (3)
That is really weird... I displayed the traceback
using print_stack
and it shows that the second external event has not the same origin. We should try to replicate it using a core widget and post an issue in ipywidgets.
In the meantime I can only try to help you with your use case. If what you want to do is format the float numbers in the cells you can do:
import ipysheet
sheet = ipysheet.sheet()
ipysheet.cell(0, 0, -0.4, numeric_format='0.000')
display(sheet)
from ipysheet.
Thanks @martinRenou
numeric_format
seems useful. I'd also like to replace non-numeric inputs with the empty string.
I tried to replicate the issue using core widgets (Select.options
instead of Cell.value
) but didn't succeed.
Let me know if you have any ideas
p.s. Do you think #66 is unrelated?
from ipysheet.
I honestly have no clue. This is really internal behavior of traitlets
and ipywidgets
and I'm not really aware of it.
But this 'old': ['-0.4000'], 'new': ['-.4']
thingy is really odd, I don't see why it should happen. I guess it's a bug.
The thing is that you are setting the value of the cell in the callback of an observe
call, which is not really common use case.
I guess what you would need is a traitlets validator instead?
from ipysheet.
Related Issues (20)
- Setting numeric format with custom renderer
- Add style to sheet-row from_dataframe() HOT 2
- Sorted column cannot stay if you update any cell values
- to_array() does not return cell value changed by clicking inside table HOT 2
- Error displaying widget: model not found HOT 8
- Loading failed for ... ipysheet@~0.5.0/dist/index.js HOT 6
- fail to build on jupyterlab 3.1.7 for @5.0.0 HOT 7
- Documentation site is broken HOT 2
- Adding javascript renderer causes columns to change size randomly
- Uncaught (in promise) Error: Script error for "ipysheet" HOT 1
- Sorting does not re-order the row headers
- Unable to render outside of a notebook context
- to_dataframe() and to_array() do not return values manually entered into the cells HOT 11
- Get the index of the clicked row
- ipysheet persistence? HOT 2
- /dist AMD modules not published HOT 4
- Incompatability with ipywidgets 8.x HOT 2
- Enable ipysheet to run on pyodide HOT 1
- Support for JupyterLite HOT 1
- How do you index cells in a sheet
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 ipysheet.