Comments (7)
Why do you think this should be convertible to a float? Looks like a bad input to me.
from polars.
I found this in a random CSV file that I wanted to parse. I guess it's a relatively rare but legitimate ("non-")character that's inserted by Excel/etc for number formatting
from polars.
Was it the first two bytes? FEFF
is the optional byte-order mark for BE Utf-16, and it's probably ending up in your CSV due to being exported with a specified encoding and byte order. I've had plenty of CSVs that get wonky due to this mark, and I usually open them and re-encode them as UTF-8 in Notepad++ or something similar.
I don't know if polars checks the byte order mark if it exists. Maybe it should, but if so that should be its own issue. But it doesn't seem to have caused many problems for people up until now.
from polars.
No, it was between two separators like this
transaction_id;amount
abcdef;-\ufeff42
from polars.
According to https://www.unicode.org/faq/utf_bom.html#bom6, that shouldn't be there at all. I'd do a replace prior to trying to do anything with that string.
from polars.
Hmm ok sounds like an actual bug in my data then.
The only annoying thing that remains a potential todo is to improve displaying of the character in the error message. Although not sure how to display it since it's a "zero width" character...
from polars.
Yeah this doesn't sound like something Polars should fix. Closing then!
from polars.
Related Issues (20)
- Multiple - Reading into a single DataFrame - read_csv - Error when using encoding = latin1 HOT 2
- Big integer error HOT 1
- Add a `newline` parameter to `read_csv` HOT 3
- `sort_by` + `struct` + `exclude` index out of bounds PanicException HOT 2
- CSV Downloads Fail for ADLS Gen2 with Azure CLI Authentication HOT 4
- Panic on datetime column min() HOT 1
- High memory usage after `collect()` despite using `limit(1)`
- Conda package outdated HOT 2
- DateFrame.describe() reports datetime as str HOT 2
- pl.list,len() - pl.list,len() always returning u32 no matter the results HOT 5
- [FEA]: Allow specifying null location in `set_sorted`
- Expose the individual parameters from fastexcel.load_sheet in pl.read_excel HOT 1
- Provide native and fast Series slice assignment (currently slower than Pandas) HOT 6
- Supporting multidimensional array style operations, by specifying metadata columns
- struct field access returns incorrect values HOT 3
- pl.struct with no arguments triggers a panic
- Multiple expr.head(n).max()/min()/etc operations in with_columns causing ShapeError
- Add `repeat` and `tile` for Series/Expr
- `SchemaFieldNotFoundError` when chaining `select` and `collect`
- Series is ignoring the dtype argument, series.to_numpy() dtype depends on values passed
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 polars.