Member-only story

Pandas Tutorial: Pandas Series Basics

Jesse L
3 min readOct 13, 2021

--

Hi everyone, welcome back. Pandas is a library for the Python programming language and is commonly used for data science purposes. Pandas can refer to both “Panel Data” and “Python Data Analysis”. Pandas is used specifically for working with data sets and provides various functions and support regarding data. In order to use Pandas on your machine, you will need Python and Pandas installed and ready to go. Getting started with Pandas can be found here.

Pandas makes many data-related tasks easy for developers and data scientists. One of the data structures that Pandas uses are series and we will look at some of the basic functionality that series provides. The structure of a Pandas series is similar to that of a one dimensional array.

Creating Series

Let’s see an example of how we can create a Pandas series:

import pandas as pd
myData = ["data1", "data2", "data3"]
mySeries = pd.Series(myData)
print(mySeries)
Output:0 data1
1 data2
2 data3
dtype: object

As you can see in our output, we have displayed our series which contains our data. Notice that our output also contains index numbers corresponding to each piece of data in our series.

Loc Property

--

--

Jesse L
Jesse L

Written by Jesse L

Hi, I'm a passionate technology enthusiast and lifelong learner. Beyond my technical pursuits, I'm also passionate about sharing my enthusiasm with others.

No responses yet