- [Instructor] After the nested for loops…on line 22 through 27 finish building up…my barometric pressure and date-time list,…the next two lines in my program, 29 and 30,…convert those lists into NumPy arrays,…because I need them formatted…as arrays to use with matplotlib.…At first glance, this might seem like…an inefficient way to do things.…Instead of creating two empty lists on line 20,…I could just as easily have written the program…to create two empty arrays and then simply appended…the data values directly to those arrays.…
That would save me from having to do the final step…of converting from lists to arrays.…However, there is a reason that I chose…to assemble my data structure as a list,…and it has to do with how lists…and arrays are implemented in Python.…Looking at the webpage of frequently asked questions…about the design and history of Python,…there's a question that simply asks,…how are lists implemented?…Although the answer they gave here is a bit hand-wavy,…it's good enough to explain why I used lists in my solution.…
Author
Released
6/8/2018Visit other courses in the series to see how to solve the same challenges in languages like C++, C#, JavaScript, PHP, Python, Ruby, Go, and Swift.
Skill Level Intermediate
Duration
Views
Related Courses
-
Learning the Python 3 Standard Library
with Kathryn Hodge2h 9m Intermediate -
Python Essential Training
with Bill Weinman4h 45m Intermediate -
Learning Python
with Joe Marini2h 27m Beginner -
Code Clinic: Java
with Carlos Rivas1h 13m Intermediate
-
Introduction
-
Welcome1m 26s
-
-
1. Problem 1: Weather Statistics
-
2. Problem 2: Where Am I?
-
Intro: Where am I?1m 46s
-
Making a POST with requests2m 14s
-
-
3. Problem 3: Eight Queens
-
Intro: Eight queens1m 42s
-
Understanding permutations3m 42s
-
-
4. Problem 4: Musical Instrument
-
Intro: Accessing peripherals1m 54s
-
-
5. Problem 5: Facial Recognition
-
Intro: Facial recognition1m 38s
-
Scaling images3m 12s
-
Saving results as JSON1m 51s
-
-
6. Problem 6: Real-Time Information Dashboard
-
Understanding Django2m 13s
-
Routing URLs with Django3m 53s
- 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: Loading data into NumPy arrays