Join Michele Vallisneri for an in-depth discussion in this video Aggregation, part of Introduction to Data Analysis with Python.
- Pandas has very convenient features to aggregate data.…That is, to compute summary statistics about datasets…either as a whole or after dividing them into subsets…based on data values.…I will show you how to describe data this way,…how to group them,…and how to create multidimensional groupings…known as pivot tables.…I will also show you how easy it is…to load a data frame…from a standard comma-separated-value text file.…Let's open the IPython Notebook…and let's select the 06_05_aggregation_begin…exercise file.…
As usual, we start by importing pandas.…As I said, pandas is very good at reading data…from many different types of file:…JSON, text, excel, HDF.…In this case, we will load a data frame…from the comma-separated-file tips.csv,…which is included in your Exercise File directory.…Let's have a look at the first few lines of the file.…We open it for reading,…call readlines,…and use slicing to select the first 10 rows.…As you can see, the first line…specifies the names of data columns.…
The following lines give the values,…
- 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
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.