- numpy - pandas import numpy as np import pandas as pd x = pd.Series([1,2,3,4,5,6,7,8,9,10]) print([i**2 for i in x])