13 Configuring pandas
This chapter covers
- Configuring pandas display settings for both the Notebook and single cells
- Limiting the number of printed
DataFrame
rows and columns - Altering the precision of decimal-point numbers
- Truncating a cellâs text content
- Rounding numeric values when they fall below a floor
As weâve worked through the bookâs data sets, weâve seen how pandas improves our user experience by making sensible decisions on data presentation. When we output a 1,000-row DataFrame
, for example, the library assumes that weâd prefer to see 30 rows from the beginning and end rather than the whole data set, which can clutter the screen. Sometimes, we may want to break from pandasâ assumptions and alter its settings to fit ...
Get Pandas in Action now with the O’Reilly learning platform.
O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.