This tool automatically formats csv files so that they can be processed accurately by arcGIS. I wrote this program to automatically format the files, as my group members planned on going through and formatting each file manually. It takes about 10 seconds to run, and it allows us to process all the files at once without having to worry about user error!
- The first step is to open format.py in Visual Studio Code. You can clone the repository from github here.
- Download all of your raw csv files, and place them inside of the folder called rawFiles.

- Open a terminal in VS Code. If you’re on a computer running windows, you’ll need to download WSL in order to use the terminal. I used Ubuntu, and more information on installing Ubuntu can be found here.

- Run the program by typing:
python3 format.py. The program will then clean all the files and export them into a folder called Cleaned Files.
- Now, you just need to navigate to the Cleaned Files folder. If you’re not sure where to find it, you can always right click on Cleaned Files in VS Code and select Reveal In Explorer. Alternatively, you can select Cleaned Files and press Shift+Alt+R.

- Now you have a folder full of cleaned and formatted CSV files!
1 thought on “Python Program Tutorial”
Comments are closed.
This tutorial was super helpful! I never knew about this feature in Python until now. I specifically appreciate the images about how your VS Code browser should appear through the process.