I am trying to get a new series by calculating 10 to the power of an existing series. I have tried pandas.Series.rpow and numpy.power, but they all show strange results.
Here is my code:
data = pd.read_csv('Book1.csv', sep=',', header=None, encoding='utf-8')
iexp = data.iloc[:, 9]
s = pd.Series(10, index=iexp.index)
print(s ** iexp)

>Solution :
Try apply
data = pd.read_csv('Book1.csv', sep=',', header=None, encoding='utf-8')
iexp = data.iloc[:, 9]
def power_10(x):
return 10 ** x
iexp.apply(power_10)