Comments (5)
@adamreeve @wukan1986
I have put in a PR to fix this issue. The fix was straightforward, but I am new to this project and am hoping to get help with the associated unit tests.
from polars.
Is not it sensible to keep the behavior as it? Parquet files without a schema? I think write_parquet should error when trying to write schema-less parquets.
Duckdb fails to read the file too: Error: Invalid Error: Failed to read Parquet file "test.parquet": Need at least one non-root column in the file
from polars.
Hi, @taki-mekhalfa
This problem easily occurs when reading a folder, because the folder contains files generated by other software using pandas and saved daily. There is no data on the new day, but the files are generated.
However, if you read the folder directly here, an error will be reported.
from polars.
Is not it sensible to keep the behavior as it? Parquet files without a schema? I think write_parquet should error when trying to write schema-less parquets.
I disagree, it is completely valid to create an empty Polars DataFrame, so why should it not be possible to round-trip this via Parquet too? I would also not describe such a file as schema-less, there is a schema and it has zero columns.
As a counter-example to DuckDB, PyArrow can read and write Parquet files with zero columns without any problem, as shown in the example in the description.
from polars.
I have started working on this. This has also been reported as part of (#9016) where @gregates helpfully gave some Rust code for reproducing this directly.
from polars.
Related Issues (20)
- `df.upsample` hangs when an "object" type column is present HOT 1
- Can no longer pass pd.Timestamp objects into places/expressions that take datetime64 HOT 7
- Column-autocomplete for eager DataFrames within interactive environments HOT 1
- Fix import of Worksheet from xlsxwriter HOT 1
- polars.read_csv_batched encoding Parameters not worked HOT 2
- Error when chaining a LazyFrame `.with_row_index()` with `.sink_csv()`
- Column name not found when joining by expressions (starts_with) HOT 1
- Unexpected behaviour when applying `struct.with_fields` to multiple columns HOT 1
- `scan_parquet` + `with_row_index` + selecting only the index returns empty dataframe
- scan_parquet doesn't work when reading files that have "|" in their names from blob storage HOT 6
- Allow numbers with thousand seperators to be parsed as Integer in `read_csv` HOT 1
- Unexpected behavior when apply group_by.agg
- `.str` methods silenty cast input HOT 1
- FreezeGun / Temporal subclasses not working in filter HOT 1
- The skip_nulls parameter of the map_elements method is unreasonable and confusing HOT 4
- Attribute Error message not printing the attr that's missing
- pl.Concat of empty LazyFrames fails HOT 4
- Unable to access the partitioning_flavor option when using write_parquet
- DataFrame.write_database() not passing along engine_options when using ADBC HOT 1
- Documentation suggestion: cover options for DataFrame creation from different Python data structures in User Guide and add example of list of dicts to API docs
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.