Long time VBA programmer just jumping into the deep end of the Python pool using v(3.9.1). I am using Anaconda’s Jupyter Notebook for compiling.
I also [pip] Installed (Pandas, MatPlotLib, RBase) and a couple of other library modules on the off chance I become an overnight Python Programming senstaion… (Not likely!)
I appreciate Python is structured different to VBA, particularly the use of [Importing] as opposed to [Dim] for declaring.
I’m just playing around with some examples I found on youtube and have an issue with a line in the following code which is typed exactly the same as presenter’s code and his seems to work just fine:
As I have zero idea how to debug Python Code, di I need to declare my os (Operating System) or at least, my Systems Environment so the code can navigate the second line of the code???
In [ ]: 1 import numpy as np
2 import pandas as pd 3 import os 4 import urllib 5 %matplotlib inline
In [ ]: 1 url = “https://covid19.who.int/WHO-COVID-19-Global-Data.csv”
2 file_path = os.path.join("Data", "Covid")
NameError Traceback (most recent call last)
1 url = “https://covid19.who.int/WHO-COVID-19-Global-Data.csv”
----> 2 file_path = os.path.join(“Data”, “Covid”)
NameError: name ‘os’ is not defined