Articles → Pandas → Lambda Expression In Apply Function In Dataframe In Pandas
Lambda Expression In Apply Function In Dataframe In Pandas
Example
import pandas as pd
list = [[1,2,3], [1,5,6], [7, 8,9]]
df = pd.DataFrame(list)
df.apply(lambda num: num *2)
Output
Click to Enlarge