|
|
|
|
|
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)
``` |
|
```
def showAllRows(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):
# calling itshowColumns(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.