Comments (1)
Just on the point of printing larger lists, it reminds me of the request for an equivalent to pandas display.expand_frame_repr
option: #7665
import polars as pl
import pandas as pd
df = pl.DataFrame({
"A": [ list(range(20)) for _ in range(5) ],
"B": range(5),
"C": [ "foo" * 20 for _ in range(5) ]
})
with pd.option_context(
"display.expand_frame_repr", True,
"display.max_columns", None,
"display.max_rows", None,
"display.max_colwidth", None,
):
print(df.to_pandas())
A B \
0 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] 0
1 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] 1
2 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] 2
3 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] 3
4 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] 4
C
0 foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo
1 foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo
2 foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo
3 foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo
4 foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo
.glimpse()
was previously suggested to me - which is useful, but (for me) can be a bit harder to read for longer data:
df.glimpse(max_items_per_column=-1)
Rows: 5
Columns: 3
$ A <list[i64]> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
$ B <i64> 0, 1, 2, 3
$ C <str> 'foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo', 'foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo', 'foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo', 'foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo'
from polars.
Related Issues (20)
- read_csv ignores columns param when target csv has only header
- Panic when importing parquet file HOT 3
- Switch over default engine for `read_excel` from `"xlsx2csv"` to `"calamine"`
- Compatibility with PygTrie prefix trie lists/dicts
- LazyFrame check for both `unique` and `with_row_index`
- `.map_elements` with `return_dtype=pl.List(pl.Struct)` leads to `sink_parquet` PanicException
- Incorrect `PolarsInefficientMapWarning` for string containment with `in` HOT 2
- Maintain support for parsing hive partitions from user provided directory paths HOT 1
- [QST/DOC]: Join key matching semantics for expression keys
- Adopt python `datetime.datetime.replace(...)` method as a `pl.col('date').dt.replace(...)` HOT 2
- InvalidOperationError: could not determine supertype of: [decimal[15,2], dyn float, dyn float]
- at higher scale factors, InvalidOperationError: `round` operation not supported for dtype `decimal[*,8]` HOT 2
- Group By no longer supported in Rust WASM
- Substraction not allowed anymore on date and datetime[μs] HOT 2
- file-like objects for read_csv need seek() but it's never called HOT 2
- Rust Polars v0.41.2 build fails
- Cross join followed by filtering not working using streaming API
- Custom HTTP headers in pl.scan_parquet()
- Using Slice in Polars Rolling Agg HOT 1
- column major reshape / transpose
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.