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…
Author
Released
7/18/2017- Working with Jupyter notebooks
- Using code cells
- Extensions to the Python language
- Markdown cells
- Editing notebooks
- NumPy basics
- Broadcasting, array operations, and ufuncs
- Pandas
- Conda
- Folium and Geo
- Machine learning with scikit-learn
- Plotting with matplotlib and bokeh
- Branching into Numba, Cython, deep learning, and NLP
Skill Level Intermediate
Duration
Views
Related Courses
-
NumPy Data Science Essential Training
with Charles Kelly3h 54m Intermediate
-
Introduction
-
Welcome46s
-
Mac setup1m 45s
-
Windows setup59s
-
Linux setup55s
-
-
1. Scientific Python Overview
-
2. The Jupyter Notebook
-
Use code cells3m 4s
-
Understand markdown cells3m 23s
-
Edit notebooks4m 10s
-
3. NumPy Basics
-
Overview: NumPy2m 1s
-
NumPy arrays4m 51s
-
Slicing2m 24s
-
Learn Boolean indexing4m 8s
-
Understand broadcasting2m 32s
-
Understand array operations5m 27s
-
Understand ufuncs5m 7s
-
-
4. Pandas
-
Pandas overview1m 58s
-
Load CSV files5m 19s
-
Parse time1m 46s
-
Access rows and columns6m 2s
-
Use pure Python packages2m 19s
-
Calculate speed6m 26s
-
Display a speed box plot2m 41s
-
-
5. Conda
-
Manage environments5m 11s
-
6. Folium and Geo
-
Draw a track on the map4m 51s
-
Use geo data with Shapely6m 10s
-
Generate a report3m 41s
-
7. NY Taxi Data
-
Examine data2m 7s
-
Load data from CSV files2m 44s
-
Work with categorical data2m 50s
-
Work with data: Weather data5m 30s
-
-
8. scikit-learn
-
Introduction: scikit-learn1m 15s
-
Understand train/test splits2m 30s
-
Preprocess data4m 32s
-
Compose pipelines2m 40s
-
Save and load models1m 27s
-
-
9. Plotting
-
Overview: matplotlib1m 5s
-
Use styles3m 1s
-
Customize Pandas output5m 38s
-
Use matplotlib3m 13s
-
Tips and tricks6m 1s
-
Understand bokeh4m 36s
-
-
10. Other Packages
-
Other packages overview1m 19s
-
Understand deep learning7m 52s
-
Understand NLP: NLTK6m 43s
-
Understand NLP: SpaCy2m 51s
-
-
11. Development Process
-
Overview55s
-
Understand source control3m 43s
-
Learn code review4m 55s
-
Testing overview2m 19s
-
Testing example3m 48s
-
-
Conclusion
-
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.
CancelTake 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.
Share this video
Embed this video
Video: Use pure Python packages