Display data in pandas dataframe
put data_pandas
in a cell and run that cell. It will display the content in output.
To be able to do the same thing in pycharm you will have to run anaconda notebook from pycharm. Which works like this: https://www.jetbrains.com/help/pycharm/2016.3/using-ipython-jupyter-notebook-with-pycharm.html
Then it's basically same as running a normal jupyter notebook on a different browser.
If you are running a normal python program and want an inline output, it's not going to happen. You will have to at least run an Ipython program to do so. Iteractive python.
Related videos on Youtube

user3848207
Updated on June 28, 2022Comments
-
user3848207 11 months
This code allows me to display panda dataframe contents in Jupyter notebook.
import pandas as pd # create a simple dataset of people data = {'Name': ["John", "Anna", "Peter", "Linda"], 'Location' : ["New York", "Paris", "Berlin", "London"], 'Age' : [24, 13, 53, 33] } data_pandas = pd.DataFrame(data) # IPython.display allows "pretty printing" of dataframes # in the Jupyter notebook display(data_pandas)
However, I am not using Jupyter notebook. I am using pycharm and Anaconda (python v3.6). How should I display
data_pandas
if I am not using Jupyter? -
user3848207 about 6 yearsDo I need to be using Jupyter to put
data_pandas
in a cell? I am using pycharm, not Jupyter. -
Vikash Singh about 6 yearsoh 2 mins. checking.
-
Psidom about 6 years@user3848207 You can run a jupyter notebook in pycharm as well, if you like. Btw, if you are doing analysis, notebook will be better than a dev environment. But with print(data_pandas), you should be able to see it in the console when you run the python file.