Comments (9)
I do not like side-effect programming like that too, but we gotta admit that it is pretty useful.
Anyway, I don't really get what you mean by "So perhaps I should switch back to strings if I want to allow empty cells"
. Cells will be empty if values are None, if that's what you are looking for:
s = ipysheet.sheet(rows=1, columns=4)
row = ipysheet.row(0, [0, None, 2, 3])
s
and this is the output:
This example is using the easy API but you can replicate the same behavior with Cell
, using numeric type.
from ipysheet.
Mmh, just one thing first, why are you creating your cell like that:
Cell(value='', ..., type='numeric')
?
You're passing a string value but you expect type to be numeric, it's kind of weird no?
Maybe you would prefer to use the easy API:
from ipysheet import sheet, cell # Without the capital letters
s = sheet()
cell(0, 0, value=4.)
s
from ipysheet.
Thinking about it, I think your Cell(value='', ..., type='numeric')
should throw an error Python side
from ipysheet.
Thinking about it, I think your
Cell(value='', ..., type='numeric')
should throw an error Python side
So perhaps I should switch back to strings if I want to allow empty cells
from ipysheet.
Mmh, just one thing first, why are you creating your cell like that:
Cell(value='', ..., type='numeric')
?
You're passing a string value but you expect type to be numeric, it's kind of weird no?
Maybe you would prefer to use the easy API:from ipysheet import sheet, cell # Without the capital letters s = sheet() cell(0, 0, value=4.) s
Thanks Martin.
I'm familiar with the "easy" API, but I'm opposed to its matplotlib style "everything is a side-effect" philosophy.
from ipysheet.
Closing this one, feel free to open again if needed
from ipysheet.
@martinRenou Why close it?
The original issue (period terminated integer) still persists in 5065a59
from ipysheet.
I closed it because it was an issue in your code, no? You were creating a 'numeric' cell given a string value.
I guess the link you just gave is wrong? It is not related to this issue
from ipysheet.
Oh sorry, I get it.
Yeah, the issue you are talking about still stands. I guess this issue you already opened is clearer. We need to have an 'int' and a 'float' cell type. This could fix your issue.
from ipysheet.
Related Issues (20)
- 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
- Float is being forced on cell values rendered via ipywidgets HOT 1
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.