Run ❯
Get your
own Python
server
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
import pandas as pd def change_age(x): x["age"]=[10, 20, 30] return x data = { "name": ["Sally", "Mary", "John"], "age": [50, 40, 30] } df = pd.DataFrame(data) df.pipe(change_age) print(df)
name age 0 Sally 10 1 Mary 20 2 John 30