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


Picture showing the output of apply function in dataframe in pandas

Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Monday, May 06, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250