The DataFrame Object

In the previous lesson, we learned about Series. The next fundamental structure in Pandas that we will learn about is the DataFrame. While a Series is essentially a column, a DataFrame is a multi-dimensional table made up of a collection of Series. Dataframes allow us to store and manipulate tabular data where rows consist of observations and columns represent variables.

There are several ways to create a DataFrame using pd.DataFrame(). For example, we can create a DataFrame by passing multiple Series into the DataFrame object, we can convert a dictionary to a DataFrame or we can import data from a csv file. Let’s look at each of these in detail.

Get hands-on with 1400+ tech skills courses.