Git Product home page Git Product logo

Comments (3)

GegznaV avatar GegznaV commented on August 27, 2024

I see that this 20-character limit is hardcoded here:

str_limit: int = 20 # For longer strings, limit chars shown.

Can it be converted into a parameter/argument? Or can different lengths be used for different data types? Or can this vary depending on the available column width in order not to leave any empty space?

from skimpy.

aeturrell avatar aeturrell commented on August 27, 2024

This could do with something that adjusts more naturally to the number of characters in the column. As a general rule, I try to avoid lots of parameter options in favour of good average settings as this makes the code more maintainable and more concise.

Will take a look at it and see if we can change the behaviour to better suit cases where the needed column space is less.

from skimpy.

aeturrell avatar aeturrell commented on August 27, 2024

This can be closed as fixed in 98dbf76.

I've made a few changes:

  • long column names now wrap
  • instead of the strings of column names being truncated, as they were before, now the width of the columns is truncated

This means (in reference to your points):

  1. You will have to do this yourself in your dataframe, but with the new column name wrapping, it should now be unambiguous as to which column you're dealing with when columns have similar characters for the first 20 characters
  2. the empty space is removed
  3. instead of ellipsis, we have a wrapped column
  4. see 1.

Hopefully this helps improve the package for you and other users!

from skimpy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.