It seems you are trying to run this script on a macOS machine. And I'm supposing you have the three CSV files in the same folder as the Python script.
You need to navigate, via terminal, to the folder the files are stored. So, first open the Terminal application, then navigate to the folder with this command: cd /Users/myname/Desktop/sealsort
(here I'm using the same path that is in your question), then you will need to execute the script as described in the first comments:
# USE LIKE:
# python sealsort.py /path/to/newm/survey /path/to/retm/survey /path/to/school/doc
Supposing the files are: s18_new.csv, s18_return.csv, s18_schools.csv, execute the script specifying the name of these files as arguments to the program. If you do not specify any of the required arguments, one of the elements at the indexes 1
, 2
, and 3
will not be found and you will get that error (IndexError: list index out of range
).
So, the correct command would be: python sealsort.py ./s18_new.csv ./s18_return.csv ./s18_schools.csv
This way, the element at index 0
(of argv) will be sealsort.py
, the element 1
will be s18_new.csv
, 2
will be s18_return.csv
, and 3
will be s18_schools.csv
.
I hope this helps.