Importing Pandas in a .Py file in Visual Studio Code to read csv file

I am moving my code from a .ipynb file into a .py so my data preprocessing can be part of an app development (mostly built in Python). Is there a reason why the .py file does not recognize import pandas? It came back with -

import pandas.
sf_data_org = pd.read_csv('SF_data.csv')

came back with the traceback:

import pandas as pd Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'pandas' sf_data_org = pd.read_csv('SF_data.csv') Traceback (most recent call last): File "", line 1, in NameError: name 'pd' is not defined

I was trying to load .csv with pd.read_csv('csvfilename.csv').

Would it be better to load a .csv with:

with open('csvfilename.csv', 'r') as csv_file: 
    csv_reader = csv.reader(csv_file) 
    for row in csv_reader:
    print(row)

Please advice! Highly appreciated!