Join Michele Vallisneri for an in-depth discussion in this video DataFrames in Pandas, part of Introduction to Data Analysis with Python.
- Pandas DataFrames extend NumPy…two-dimensional arrays by giving labels to the columns…and if you provide an explicit index,…also to the rows.…I will show you several things about DataFrames:…how to create them from Panda Series,…Python dicts, and NumPy arrays,…how to work with Indexes and columns,…and how to perform database-style operation…between DataFrames, such as joins.…Let's go to the Python notebook.…And let's open the 06_03_dataframes_begin exercise file.…
We will level wait the cells already in the notebook.…They define two Panda Series that contain data…about computer language popularity in 2014 and 2015.…So we go to the cell menu and select Run All.…From two series, we can create a DataFrame.…The indexes will be matched automatically.…That's the kind of magic that Pandas does for us.…We included two series in a Python dict…so the keys will be used as column names.…So I call Pandas DataFrame and give it…a Python dict with key 2014 for the first series…and 2015, obviously, for the second.…
Let's have a look.…
- Writing and running Python in iPython
- Using Python lists and dictionaries
- Creating NumPy arrays
- Indexing and slicing in NumPy
- Downloading and parsing data files into NumPy and Pandas
- Using multilevel series in Pandas
- Aggregating data in Pandas
Skill Level Intermediate
Q: The course shows how to download files from FTP and web servers using Python 3.X. How do I do the same thing with Python 2.7?
A: First <span style="font-family: Courier;">import urllib</span>, then use <span style="font-family: Courier;">urllib.urlretrieve(URL,filename)</span>. For instance, to download the stations.txt files used in the chapter 5 video “Downloading and parsing data files,” you’d do <span style="font-family: Courier;">urllib.urlretrieve(‘ftp://ftp.ncdc.noaa.gov/pub/data/ghcn/daily/ghcnd-stations.txt','stations.txt')</span>.
1. Installation and Setup
2. Refresher: Data Containers in Python
3. Word Anagrams in Python
4. Introduction to NumPy
5. Weather Data with NumPy
6. Introduction to Pandas
7. Baby Names with Pandas
Next steps1m 36s
- 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.