From the course: Python Functions for Data Science

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Create pandas series and dataframes

Create pandas series and dataframes

From the course: Python Functions for Data Science

Create pandas series and dataframes

The Pandas library makes it easy to work with tabular data. In other words, data that's in a tabular format similar to spreadsheets with rows and columns. Pandas is one of the most widely used tools in data science because it allows you to load, explore, and manipulate data efficiently. In this lesson, you'll learn how to create Series and DataFrames, and how to load data directly from a CSV file, which is one of the most common file formats for datasets. The first step is to import Pandas. The convention is to import it using the alias “pd”. A Pandas series is a one-dimensional array that supports both integer-based and label-based indexing. You can think of it like a single column of data. Here I'll create a Pandas series of student scores. I've called pd.series() and passed in a list of scores as data. You can see the series default indexing here, starting from 0 and increasing incrementally by 1. Another option is to create the score series using letters for the indexing. Here is…

Contents