Articles → PANDAS → Apply Function In Dataframe In Pandas
Apply Function In Dataframe In Pandas
Purpose
Example
import pandas as pd
import numpy as np
list = [[1,2,3], [1,5,6], [7, 8,9]]
df = pd.DataFrame(list)
df.apply(np.sqrt)
Output
Click to Enlarge