Get your own Python server Result Size: 625 x 565
x
 
import pandas as pd
def eur_to_nok(x):
  return x * 10
data = {
  "for1": [2, 6, 3],
  "for5": [8, 20, 12]
}
df = pd.DataFrame(data)
newdf = df.transform(eur_to_nok)
print(newdf)
     for1  for5
  0    20    80
  1    60   200
  2    30   120