Comments (3)
Can you create a reproducible example?
from polars.
Error starts when concatenating 2nd row onwards -
shape: (1, 5)
┌───────────────────┬───────────────────┬───────────────────┬───────────────────┬──────────────────┐
│ Dealer ┆ AssetManager ┆ LeveragedFunds ┆ OtherReportables ┆ NonReportables │
│ --- ┆ --- ┆ --- ┆ --- ┆ --- │
│ struct[4] ┆ struct[4] ┆ struct[4] ┆ struct[4] ┆ struct[4] │
╞═══════════════════╪═══════════════════╪═══════════════════╪═══════════════════╪══════════════════╡
│ {{5637.0,10503.0, ┆ {{761.0,1541.0,14 ┆ {{813.0,22040.0,2 ┆ {{2763.0,13974.0, ┆ {{690.0,1812.0,3 │
│ 761.0},{11.3,21.0 ┆ 59.0},{1.5,3.1,2. ┆ 6343.0},{1.6,44.0 ┆ 6392.0},{5.5,27.9 ┆ 06.0},{1.4,3.6,0 │
│ ,1.5},{166.0,-470 ┆ 9},{761.0,-434.0, ┆ 99998,52.700001}, ┆ ,12.8},{89.0,774. ┆ .6},{159.0,-179. │
│ 4.0,761.0},{4.0,5 ┆ 655.0},{15.0,11.0 ┆ {221.0,3443.0,739 ┆ 0,382.0},{0.0,0.0 ┆ 0,37.0},{0.0,0.0 │
│ .0,15.0}} ┆ ,7.0}} ┆ 9.0},{97.0,25.0,8 ┆ ,0.0}} ┆ ,0.0}} │
│ ┆ ┆ .0}} ┆ ┆ │
└───────────────────┴───────────────────┴───────────────────┴───────────────────┴──────────────────┘
cot_df_cur
shape: (1, 5)
┌───────────────────┬───────────────────┬───────────────────┬───────────────────┬──────────────────┐
│ Dealer ┆ AssetManager ┆ LeveragedFunds ┆ OtherReportables ┆ NonReportables │
│ --- ┆ --- ┆ --- ┆ --- ┆ --- │
│ struct[4] ┆ struct[4] ┆ struct[4] ┆ struct[4] ┆ struct[4] │
╞═══════════════════╪═══════════════════╪═══════════════════╪═══════════════════╪══════════════════╡
│ {{0.0,3701.0,0.0} ┆ {{0.0,0.0,0.0},{0 ┆ {{0.0,902.0,17450 ┆ {{215.0,21676.0,3 ┆ {{0.0,2517.0,310 │
│ ,{0.0,14.6,0.0},{ ┆ .0,0.0,0.0},{0.0, ┆ .0},{0.0,3.6,68.9 ┆ 634.0},{0.8,85.59 ┆ .0},{0.0,9.9,1.2 │
│ 0.0,1084.0,0.0},{ ┆ 0.0,0.0},{0.0,0.0 ┆ 00002},{0.0,723.0 ┆ 9998,14.4},{184.0 ┆ },{0.0,172.0,-2. │
│ 0.0,0.0,0.0}} ┆ ,0.0}} ┆ ,2855.0},{7.0,4.0 ┆ ,1879.0,-1163.0}, ┆ 0},{0.0,0.0,0.0} │
│ ┆ ┆ ,123.0}} ┆ {19.0,0.0,0.0}} ┆ } │
└───────────────────┴───────────────────┴───────────────────┴───────────────────┴──────────────────┘
cot_df_curtype Int64 is incompatible with expected type Float64
shape: (1, 5)
┌───────────────────┬───────────────────┬───────────────────┬───────────────────┬──────────────────┐
│ Dealer ┆ AssetManager ┆ LeveragedFunds ┆ OtherReportables ┆ NonReportables │
│ --- ┆ --- ┆ --- ┆ --- ┆ --- │
│ struct[4] ┆ struct[4] ┆ struct[4] ┆ struct[4] ┆ struct[4] │
╞═══════════════════╪═══════════════════╪═══════════════════╪═══════════════════╪══════════════════╡
│ {{127.0,22378.0,0 ┆ {{0.0,13428.0,464 ┆ {{529.0,17397.0,1 ┆ {{444.0,4651.0,17 ┆ {{1.0,3691.0,174 │
│ .0},{0.3,55.59999 ┆ .0},{0.0,33.29999 ┆ 2994.0},{1.3,43.2 ┆ 15.0},{1.1,11.6,4 ┆ 2.0},{0.0,9.2,4. │
│ 8,0.0},{127.0,208 ┆ 9,1.2},{-872.0,-2 ┆ 00001,32.299999}, ┆ .3},{-914.0,2697. ┆ 3},{-28.0,-170.0 │
│ 91.0,-872.0},{0.0 ┆ 99.0,69.0},{41.0, ┆ {-99.0,1470.0,-16 ┆ 0,-686.0},{0.0,0. ┆ ,-448.0},{0.0,0. │
│ ,22.0,41.0}} ┆ 11.0,14.0}} ┆ 001.0},{9.0,0.0,0 ┆ 0,0.0}} ┆ 0,0.0}} │
│ ┆ ┆ .0}} ┆ ┆ │
└───────────────────┴───────────────────┴───────────────────┴───────────────────┴──────────────────┘
type Int64 is incompatible with expected type Float64
from polars.
@starzar You'll need to provide a full code example in order for other people to run it and reproduce the problem.
from polars.
Related Issues (20)
- cannot find function `as_struct` in this scope HOT 2
- QOL improvements for .rolling
- Include example with function accepting multiple arguments in `Expr.map_batches`
- Documentation issue in `normalize`/`name` parameter from `.value_counts()` method HOT 2
- writing to os.devnull
- `Series[list].explode()` should not return `None` for empty lists
- write_database to snowflake with adbc engine spouts context canceled error log
- Cannot tell if hvplot version 0.10.0 >= 0.9.1 HOT 2
- dtype 'Time' gets converted to i64 when collect(streaming=True) is used. HOT 1
- `.agg_groups()` PanicException when not used in a group_by context
- Additional Parameter for json_normalize HOT 5
- fold shouldn't require that acc and exprs share the same dtype
- Adding `descending` parameter to `Expr.over` HOT 5
- polars.LazyFrame.head recommends using fetch()
- Reading large json file error: ComputeError: InputTooLarge at character 0
- Serialize for AnyType has a todo!() HOT 1
- File cache invalidation not triggered for HTTP if size is the same
- Loading parquet written from an Arrow table produces non-deterministic incorrect numbers since 1.2.0
- illegal hardware instruction with python 3.12.4 and polars 1.1.0 on MacOS Sanoma 14, M2 HOT 3
- Panic when call `hash()` on `struct` dtype
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.