Python makes it easy to reuse code with packages. Learn how the Python import mechanism works and how you can write use modules written by other people with minimal effort.
- [Instructor] Now that we've looked at data frames…and time zones,…let's get back to our goal…which is to calculate how slowly I jog.…We have the time but to calculate speed…we need distance data as well.…We have latitude and longitude.…and to calculate the distance on Earth's surface,…we're going to use a small pure Python Package.…I'm going to grab geo.py from the exercise files…to where the Jupyter notebook is running.…By default, the notebook will run in your home directory.…However you can check the current directory…with the percent pwd magic.…
So I'm going to go to where the exercise files are,…copy the geo.py file.…And then select Go and Home…and paste it there.…Now we can import the module,…import geo.…If you get an import error…this means that geo.py is not located in one of…the directories that Python is looking for models in.…You can view this list by running the following code.…We'll import sys…and look at sys.path.…
As long is geo.py is in one of these directories…you should be fine.…The other option is to edit directory…
- Working with Jupyter notebooks
- Using code cells
- Extensions to the Python language
- Markdown cells
- Editing notebooks
- NumPy basics
- Broadcasting, array operations, and ufuncs
- Folium and Geo
- Machine learning with scikit-learn
- Plotting with matplotlib and bokeh
- Branching into Numba, Cython, deep learning, and NLP
Skill Level Intermediate
NumPy Data Science Essential Trainingwith Charles Kelly3h 54m Intermediate
1. Scientific Python Overview
2. The Jupyter Notebook
3. NumPy Basics
Manage environments5m 11s
6. Folium and Geo
7. NY Taxi Data
10. Other Packages
11. Development Process
Next steps1m 33s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.