Comments (6)
PS: fill_nan works, however cost my 1 hour to dig this problem .
NaN is a floating point value NotANumber which is not the same as null/none.
from polars.
You are dividing by 0, resulting in a NaN value. NaN is not a null (missing) value. Being able to differentiate between null values and NaN values is super useful.
from polars.
Would it be worthwhile adding a note/warning to the fill_null docs?
Or maybe linking to the user guide?
The assumption that fill_null will work on NaN has popped up a few times.
from polars.
@ritchie46 pandas only have method fillna
, and other functions like notnull
,isnull
also check the value is nan of not .
from polars.
That's because pandas mixes floating point NaN
and missing values.
We don't follow pandas. It is not correct on this matter.
from polars.
@ritchie46 I think it better to warn this in docs at least , because many people come from pandas would easily make mistakes .
from polars.
Related Issues (20)
- ComputeError: parquet: File out of specification: Invalid thrift: protocol error HOT 2
- List(string) cannot be coerced with String anymore since 1.0 in Concat HOT 2
- Support `Decimal` in `read_csv` HOT 3
- `pl.struct` named expr combined with `.name.keep()` PanicException
- pl.col() mixes strangely with selectors HOT 1
- LazyFrame OOM on CSVs with rows that contains large amount of data HOT 2
- `pl.from_pandas` with columns that mix strings and NAs results in `TypeError` HOT 2
- ComputeError: this expression cannot run in the group_by context HOT 1
- Polars from Pandas - NaN no longer convert to Null when mixed datatypes HOT 1
- Rename after finishing writing file to disk to avoid corrupted parquet files.
- Scan_parquet no longer returns the hive partition column of parquet files in polars==1.0.0 HOT 1
- polars List type columns accessors not returning the right dtype HOT 1
- `scan_parquet` cannot read directory-style hive partitioned parquet files in polars==1.0.0 HOT 5
- `Expr.slice` no longer allows `length = None` HOT 1
- `PanicException` raised on converting result to string HOT 1
- `read_ipc` and `scan_ipc` use more memory than needed. HOT 2
- List.eval giving unexpected results HOT 4
- polars.Expr.all method description is unclear on ignore_nulls parameter logic
- Using `scan_csv` with `with_column_names` argument disables schema validation
- `strict` parameter not applied correctly during row-wise DataFrame construction HOT 5
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.