Create Pandas Series using NumPy functions Last Updated : 11 Jul, 2025 Comments Improve Suggest changes 1 Likes Like Report A Pandas Series is like a one-dimensional array which can store numbers, text or other types of data. NumPy has built-in functions that generate sequences, random values or repeated numbers In this article, we'll learn how to create a Pandas Series using different functions from the NumPy library.Method 1: Using numpy.linspace() The linspace() function creates a list of evenly spaced numbers from start to stop with num total values. It's used when you want to divide a range into equal parts. Python import numpy as np import pandas as pd ser1 = pd.Series(np.linspace(3, 33, 3)) print(ser1) ser2 = pd.Series(np.linspace(1, 100, 10)) print("\n", ser2) Output:Method 2: Using np.random.normal and np.random.rand()These functions are used when you want to create random test data.random.normal() gives random numbers from a normal distribution. You can set the average, standard deviation and how many values to generate.random.rand gives random numbers between 0 and 1 with a uniform distribution. Python import pandas as pd import numpy as np ser3 = pd.Series(np.random.normal()) print(ser3) ser4 = pd.Series(np.random.normal(0.0, 1.0, 5)) print("\n", ser4) ser5 = pd.Series(np.random.rand(10)) print("\n", ser5) Output:Using random.normal() and random.rand()The first output is a single random number from a normal distribution. The second output shows five random float numbers also from a normal distribution. The third output has ten random numbers between 0 and 1 generated from a uniform distribution.Method 3: Using numpy.repeat()The numpy.repeat() function repeats a specific value multiple times. It's used when you need to create a Series with the same value repeated. Python import pandas as pd import numpy as np ser = pd.Series(np.repeat(0.08, 7)) print("\n", ser) Output: Using repeat methodIn the above output we can see that 0.08 is repeating 8 times. With these methods we can easily create pandas series using Numpy. Create Quiz Comment S Shivam_k Follow 1 Improve S Shivam_k Follow 1 Improve Article Tags : Python Python-pandas Python pandas-series pandas-series-program Explore Python FundamentalsPython Introduction 2 min read Input and Output in Python 4 min read Python Variables 4 min read Python Operators 4 min read Python Keywords 2 min read Python Data Types 8 min read Conditional Statements in Python 3 min read Loops in Python - For, While and Nested Loops 5 min read Python Functions 5 min read Recursion in Python 4 min read Python Lambda Functions 5 min read Python Data StructuresPython String 5 min read Python Lists 4 min read Python Tuples 4 min read Python Dictionary 3 min read Python Sets 6 min read Python Arrays 7 min read List Comprehension in Python 4 min read Advanced PythonPython OOP Concepts 11 min read Python Exception Handling 5 min read File Handling in Python 4 min read Python Database Tutorial 4 min read Python MongoDB Tutorial 3 min read Python MySQL 9 min read Python Packages 10 min read Python Modules 3 min read Python DSA Libraries 15 min read List of Python GUI Library and Packages 3 min read Data Science with PythonNumPy Tutorial - Python Library 3 min read Pandas Tutorial 4 min read Matplotlib Tutorial 5 min read Python Seaborn Tutorial 3 min read StatsModel Library - Tutorial 3 min read Learning Model Building in Scikit-learn 6 min read TensorFlow Tutorial 2 min read PyTorch Tutorial 6 min read Web Development with PythonFlask Tutorial 8 min read Django Tutorial | Learn Django Framework 7 min read Django ORM - Inserting, Updating & Deleting Data 4 min read Templating With Jinja2 in Flask 6 min read Django Templates 5 min read Build a REST API using Flask - Python 3 min read Building a Simple API with Django REST Framework 3 min read Python PracticePython Quiz 1 min read Python Coding Practice 1 min read Python Interview Questions and Answers 15+ min read Like