YasserKhalil
YasserKhalil

Reputation: 9538

Display pivot tables in Spyder IDE

In fact, as I am newbie to python, I have a lot and a lot of questions. Before I post a question here, I have searched a lot for the topic but couldn't find a clue. I have such a line that creates a pivot table using Pandas package and the code works fine in Jupyter Notebook

df_bal.pivot_table(index='Grouping', values='Balance', aggfunc=sum)

But I am using Spyder IDE now and I would like to know if it is possible to view or display the pivot tables in spyder or not. All what I can do is to assign a variable to the DataFrame

x=df_bal.pivot_table(index='Grouping', values='Balance', aggfunc=sum)

and double-click in the variable explorer to see the contents .. But the view is not good as in Jupyter Notebbok

Upvotes: 0

Views: 448

Answers (1)

YasserKhalil
YasserKhalil

Reputation: 9538

To enable using Jupyter Notebook inside Spyder IDE go to this link for more details https://github.com/spyder-ide/spyder-notebook

** First step is run Anaconda Prompt

** Activate the environment you are working on

conda activate myenv

** Install the Jupyter package if not installed

conda install jupyter

** Install the package from the link spyder-notebook

conda install spyder-notebook -c spyder-ide

** Type spyder to launch Spyder IDE > Notice the bottom part has two sections Editor and Notebook. Right-Click inside Notebook section and open any file with the extension ipynb

** If the file opened appeared in blank then try to use this line in the console of spyder

conda install traitlets=4

Upvotes: 1

Related Questions