This page contains tutorials developed for beginners to learn Python (mostly for data science). Each tutorial is a self contained Jupyter Notebook. I assume almost no computing knowledge beyond how to operate your operating system.
Statement about learning to program: I’ve only taken one programming course in my life, Intro to Computing for Engineers during the first semester of undergrad. We learned how to do some stuff in Matlab. After that I didn’t do any programming for several years until I began to work at MGM. While there, we had to follow tedious instructions to make spreadsheets that took an entire work day. I thought there’d be a better way and used the basic computing concepts from my freshman year to learn VBA. My job went from 8 hours to 1 click. This is when I first fully appreciated the power of programming. During my PhD program, I began working on some optimization problems and picked up Matlab again. Of course, for econometrics, we used Stata/R to do some basic data manipulation in order to run regressions. Then I began working on a big data project that involved web scraping, data munging/cleaning, and analysis. This is when my Python journey began. The point of the story is that you can learn to program, it isn’t hard. You just need the right resources to get you started. This is intended to be such a resource.
- First download and install Anaconda (when it asks to prepend to path, do it).
- To launch Jupyter Notebook (the browser based coding environment we use)
- Open command prompt (terminal) in windows (mac)
- Browse to the root directory you want to launch from (the default one is usually fine)
- Type “jupyter notebook” and press enter
- This takes a few seconds, you should see (if everything’s installed properly) some activity going on the console/terminal screen
- Then a browser will open up to localhost:8888/tree
- This is where you can browse to your desired location
- To create a new iPython notebook, browse in your browser to the directory you want to create a notebook
- In the upper right hand corner, click “new” and select “Python Default”
- You can rename the file by clicking on the file name,”untitled,” in the resulting notebook tab and change it to whatever you’d like
- Intro to programming with Python (data types, importing modules, basic Pandas, basic plotting, loops, functions) – should take about 2 -4 hours for a complete beginner to go through and understand.