Comments (9)
Hi @durgeksh could you please provide the entire stack trace ? and maybe a file allowing to reproduce the issue ? thanks!
from fastexcel.
Traceback (most recent call last):
File "/Users/neo/Desktop/workspace/pocs/polarsdemo.py", line 84, in <module>
df = pl.read_excel("sample_data.xlsx", engine='calamine')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/neo/Desktop/workspace/pocs/.venv/lib/python3.11/site-packages/polars/_utils/deprecation.py", line 134, in wrapper
return function(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/neo/Desktop/workspace/pocs/.venv/lib/python3.11/site-packages/polars/_utils/deprecation.py", line 134, in wrapper
return function(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/neo/Desktop/workspace/pocs/.venv/lib/python3.11/site-packages/polars/io/spreadsheet/functions.py", line 253, in read_excel
return _read_spreadsheet(
^^^^^^^^^^^^^^^^^^
File "/Users/neo/Desktop/workspace/pocs/.venv/lib/python3.11/site-packages/polars/io/spreadsheet/functions.py", line 475, in _read_spreadsheet
parsed_sheets = {
^
File "/Users/neo/Desktop/workspace/pocs/.venv/lib/python3.11/site-packages/polars/io/spreadsheet/functions.py", line 476, in <dictcomp>
name: reader_fn(
^^^^^^^^^^
File "/Users/neo/Desktop/workspace/pocs/.venv/lib/python3.11/site-packages/polars/io/spreadsheet/functions.py", line 821, in _read_spreadsheet_calamine
ws = parser.load_sheet_by_name(sheet_name, **read_options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/neo/Desktop/workspace/pocs/.venv/lib/python3.11/site-packages/fastexcel/__init__.py", line 184, in load_sheet_by_name
self._reader.load_sheet(
_fastexcel.CalamineCellError: calamine cell error: #VALUE!
Context:
0: could not determine dtype for column Amount
Process finished with exit code 1
Sample file:
sample_data.xlsx
from fastexcel.
Thank you @lukapeschke for fixing this so fast.
from fastexcel.
@durgeksh you're welcome, thank you for the sample file!
from fastexcel.
@lukapeschke Can we provide an option to parse these special symbols as a string and retain in the sheet please? Now, it removes the symbol and puts null there.
Thank you.
from fastexcel.
@durgeksh could you please create a separate issue for that ? I'll mark it as a feature request
from fastexcel.
Yes, sure. Thank you.
from fastexcel.
@durgeksh It's not that simple because if it's considered as a string
then it can mess up with the rest of the column that would have another type
So it requires either everything to be casted as a string or some kind of union type on the column.
Anyway it's definitely a feature request!
from fastexcel.
@PrettyWood Yes, in that case safe typecast would be string for the column with special symbols.
from fastexcel.
Related Issues (20)
- load_sheet_by_name raises generic CalamineError instead of SheetNotFoundError HOT 1
- Add `typing-extensions` to dependencies HOT 2
- Option to retain special symbols/ errors in excel as a string HOT 1
- usecols - don't require full range
- header_row does not work as expected if there are blank rows HOT 6
- Xlsx Chart Sheet Crash HOT 4
- schema_sample_rows=0 results in a table filled with null values HOT 6
- feat: support callable in use_columns parameter
- Add an option to disable automatic type coercion
- When coercing columns to strings, boolean cells turn into null HOT 5
- Coercing dates to strings adds time of the form '00:00:00' HOT 2
- Add a note to the `skip_rows` and `header_row` parameter description that rows before header_row are automatically skipped HOT 1
- Let `dtypes` take single value that applies to all columns AND/OR cast DateTime to String instead of raising UnsupportedColumnTypeCombinationError HOT 2
- Make new `dtype_coercion`='stringify' option
- use_columns is ignored when sheets are loaded eagerly
- Implement Arrow PyCapsule Interface & make pyarrow optional dependency HOT 1
- Unable to import fastexcel - symbol not found in flat namespace '_PyPyBaseObject_Type' HOT 9
- msys2 install failed: ERROR: Could not find a version that satisfies the requirement fastexcel (from versions: none) HOT 2
- Strange failure to determine `string` dtype column in ODS sheet/file 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 fastexcel.