Key Concepts

Review core concepts you need to learn to master this subject

Pandas DataFrame creation

# Ways of creating a Pandas DataFrame # Passing in a dictionary: data = {'name':['Anthony', 'Maria'], 'age':[30, 28]} df = pd.DataFrame(data) # Passing in a list of lists: data = [['Tom', 20], ['Jack', 30], ['Meera', 25]] df = pd.DataFrame(data, columns = ['Name', 'Age']) # Reading data from a csv file: df = pd.read_csv('students.csv')

The fundamental Pandas object is called a DataFrame. It is a 2-dimensional size-mutable, potentially heterogeneous, tabular data structure.

A DataFrame can be created multiple ways. It can be created by passing in a dictionary or a list of lists to the pd.DataFrame() method, or by reading data from a CSV file.

Creating, Loading, and Selecting Data with Pandas
Lesson 1 of 2

What you'll create

Portfolio projects that showcase your new skills

Pro Logo

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory

Pro Logo