Pandas provides an effective way to apply a function to every element of a Series and get a new Series. Let us assume we have the following Series:
>>> import pandas as pd
>>> s = pd.Series([3, 7, 5, 8, 9, 1, 0, 4])
>>> s
0    3
1    7
2    5
3    8
4    9
5    1
...