Comments (3)
What is the bug here? Can you show it?
from polars.
@ritchie46
when I ran
pl.concat([a, b.rename({'data': 'data2'})], how='horizontal').sort('data').with_columns(
(pl.col('data') - pl.col('data2')).alias('diff')
)
output is:
shape: (2_352, 3)
┌─────────────┬─────────────┬─────────┐
│ data ┆ data2 ┆ diff │
│ --- ┆ --- ┆ --- │
│ f64 ┆ f32 ┆ f64 │
╞═════════════╪═════════════╪═════════╡
│ 1.6856309e7 ┆ 1.6856308e7 ┆ 1.0 │
│ 1.6874691e7 ┆ 1.6874692e7 ┆ -1.0 │
│ 1.6874691e7 ┆ 1.6874692e7 ┆ -1.0 │
│ 1.6874691e7 ┆ 1.6874692e7 ┆ -1.0 │
│ 1.6913661e7 ┆ 1.691366e7 ┆ 1.0 │
│ … ┆ … ┆ … │
│ 7.0912e10 ┆ 7.0912e10 ┆ 22.0 │
│ 8.3216e10 ┆ 8.3216e10 ┆ 2630.0 │
│ 9.3109e10 ┆ 9.3109e10 ┆ -1275.0 │
│ 1.0732e11 ┆ 1.0732e11 ┆ 2368.0 │
│ 1.2984e11 ┆ 1.2984e11 ┆ 1616.0 │
└─────────────┴─────────────┴─────────┘
show that there are differences, is it OK?
from polars.
Float32 has a lower precision than Float64, so you will see a difference when representing large integer values. I would say these results are expected. Please use Float64 for better accuracy if that is relevant to your applications.
from polars.
Related Issues (20)
- If I pass weights to rolling_var, the actual ddof will be 0 no matter what ddof I passed
- Projection pushdown with hive partitions may not be respected HOT 2
- Exclude directories from expanded glob result HOT 3
- Inconsistent behavior of `with_columns` + `lit` on empty frames HOT 3
- Add bincode serialization format to `serialize`/`deserialize` methods HOT 1
- DataFrame.to_numpy() converts None to nan HOT 8
- Literal type is not inferred in constructor
- `when/then` + `.name.keep()` ComputeError: duplicate column name
- Implement alternate version of `median` that preserves data type HOT 6
- Cannot chain over() and list.set_intersection() in polars-1.0.0beta1 (works in 0.20.31) HOT 1
- Projection pushdown not working for AnonymousScan when filtering on calculated column HOT 4
- `.implode` + `.over` + `.list.set_intersection` PanicException left == right failed. HOT 1
- polars-lazy fails to compile with `super::get_glob_start_idx` error HOT 4
- Unable to build project with 0.41.0 or 0.41.1: error[E0277] with group_join_inner in polars-ops HOT 14
- Unable to build the crate with the lazy feature! V.0.41.1 HOT 2
- Issue when collecting df
- Mention required feature flags for plotting / convert to pandas without PyArrow if possible HOT 2
- aho-corasick `.str.extract_many()`
- Broadcast operations similar to Pandas / Numpy
- pl.scan_pyarrow_dataset drops timezone information
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.