Hacker News new | ask | show | jobs
by jpn 1492 days ago
I played around with many of these before:

- https://github.com/quantopian/qgrid

- https://github.com/man-group/dtale

I find that I'm actually a lot faster using basic Pandas methods to get the data I want in exactly the form I want it.

If I really want to show everything, I just use:

```

with pd.option_context('display.max_rows', None):

   print(df)
```
2 comments

I use a similar function when I want to see everything:

```

def showAllRows(dataframeToShow):

  with pd.option_context('display.max_rows', None, 'display.max_columns', None):

    display(dataframeToShow)
# calling it while limiting the number of returned rows.

showAllRows(df.head(1000))

```

Be warned though! if you call this function without limiting the number of rows to be fetched, it is guaranteed you will crash your machine. Always use head, sample or slices.

If do get a crush, then your only option is to open the ipynb file with vi and manually delete the millions of lines this function created.

Another function that I like is:

```

def showColumns(df, substring):

    print([x for x in df.columns if substring in x])

    return
# calling it

showColumns(df, "year")

```

This is useful in data frames with many columns, when you want to find all the columns that have a specific string in their name. It returns a string, which then you can pass it in the dataframe to print only these columns.

what irks me about dtale is if you scroll with the vertical slider, it can't update the view fast enough until you stop scrolling.