Python Forum

Full Version: CSV file dont open with code
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i have put the following code in python shell and it working fine but not opening in pycharm
import pandas as pd
import numpy as np

df = pd.read_csv('C:\Program Files\PycharmProjects\code examples\StatementImportTemplate.csv')
df.head()
its showing just in output:
"C:\Program Files\python.exe" "C:/Program Files/PycharmProjects/code examples/code practice.py"

Process finished with exit code 0

csv file has two columns one has date other has numbers
Are you running this as a file ('python "code practice.py"'), right?
Your code is fine.
Try to use print(df.head()) to output head() content in your console (prompt).
thanks its working