Comments (3)
You can pass use_columns
with the calamine engine:
>>> pl.read_excel("random.xlsx", engine="calamine", read_options={"use_columns": "B:D"})
# shape: (3, 3)
# ┌──────────┬──────────┬──────────┐
# │ column_1 ┆ column_2 ┆ column_3 │
# │ --- ┆ --- ┆ --- │
# │ f64 ┆ f64 ┆ f64 │
# ╞══════════╪══════════╪══════════╡
# │ 0.900042 ┆ 0.034829 ┆ 0.110054 │
# │ 0.498876 ┆ 0.94322 ┆ 0.203003 │
# │ 0.432077 ┆ 0.888128 ┆ 0.351812 │
# └──────────┴──────────┴──────────┘
from polars.
Yup, we should expose this as a top-level option; in the meantime you can use the engine-specific read_options
parameter as suggested by @cmdlineluser (and the advice the use the "calamine" engine is also on-point as it's extremely fast, and will eventually become our new default ;)
from polars.
FYI: this was closed by #17263. Note that we are using the param name "columns" for this functionality, for consistency with the rest of the API.
from polars.
Related Issues (20)
- write_csv ignores formatting when writing to io.StringIO() HOT 3
- `read_csv` raises ComputeError when filename contains "[" HOT 1
- Performance regression (particularly in q21 of the TPC-H benchmark, +60%) after specific commit HOT 1
- bug: plotting breaks when `axis` is passed to `alt.X` HOT 3
- `pl.Array` + `pl.lit` PanicException Cannot apply operation on arrays of different lengths HOT 7
- GPU accelerated Polars taking 4 times longer to SUM a column in 100m record CSV than regular CPU. Running in Jupyter Notebook HOT 6
- Filtering with pl.col is substantially (27x) slower than filtering with pl.Series HOT 3
- Ability to `sink` lazy datasets to `STDOUT` or to files
- Panicking with "Unreachable code" when passing a DataFrame into `DataFrame.drop` HOT 1
- Polars produce wrong result in streaming mode HOT 2
- Consider removing unnecessary projection for single key join followed by `.select(pl.len())` HOT 1
- Initializing a struct series with an array type field using Numpy arrays results in nulls
- `Series` constructor is not strict for nested lists
- `join` can be called with both `on=` and `left_on=`
- Casting negative or large values to Time causes panic HOT 2
- cross join should raise when `on` is provided HOT 1
- Implement min-max predicate pushdown optimisation through joins (from DuckDB)
- `df.write_excel` does not work with file objects HOT 2
- Broken API links in the user guide (404 page not found) + stale documentation example (fetch function) HOT 4
- Performance of register_plugin_function HOT 7
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.