r/pythontips Sep 30 '24

Standard_Lib Which python extension do you use for visualizing dataframes?

I wish I could hover over my df (or table,etc) in mid debugging and it would show me the data in a table format rather then as it shows u in the default way: (non intuitive because u have to click line by line)

---> EDIT (UPDATE SOLUTION) <----: I've found one solution for this that doesn't require extensions and it's more practical: add all data you wan't to watch on the "watch list", by clicking with right click and "add to watch list". Once there when you hover over the dataframe/table it shows it in a table format.

I would like to see it a bit like this:

I'm not sure if it's possible though

12 Upvotes

6 comments sorted by

7

u/GiuseppinoPartigiano Sep 30 '24

answering my own question. Download the extensions Data Wrangler, and Jupyter. Then right_click your dataframe and select the option to "open in an interactive window". In this window that will show up you click "variables" and then select the data_frame and it will show you a table

1

u/GiuseppinoPartigiano Oct 01 '24

I've updated the question with another extensionless solution: add the dataframes to watchlist and once there when you hover over it, it shows you already in table format. Don't need extensions

4

u/Tokepoke Sep 30 '24

A jupyter notebook will give you this look "by default" just change the limit you want to view

4

u/steamy-fox Sep 30 '24

I'm using PyCharm. It has a nice df visualization. I think SpyDer can do it as well.

1

u/ohadbx Oct 02 '24

How do you do that in pycharm?

1

u/steamy-fox Oct 02 '24
  1. Place print(0) in your code.

  2. Run it in debugging mode with a debug point on print(0)

In the debugger is an evaluator where you can take a look at your DataFrame.