Dataframe head not shown in PyCharm

I have the following code in PyCharm

import pandas as pd import numpy as np import matplotlib as plt df = pd.read_csv("c:/temp/datafile.txt", sep='\t') df.head(10) 

I get the following output:

 Process finished with exit code 0 

I should get the first ten lines of my data file, but they do not appear in PyCharm .

I checked the project interpreter, and all the settings seem to be in order there. The correct packages are installed (numpy, pandas, matplotlib) under the right version of Python.

What am I doing wrong? Thanks.

+7
python pandas pycharm dataframe
source share
1 answer

PyCharm not a Python Shell that automatically prints all results. You must use print() to display something.

 print(df.head(10)) 
+16
source share

All Articles