I have created a function where I need to pass data frame I get shape and return me df.head()
def shape_of_df(df):
tup = df.shape
print('Shape of df is Rows :{0[0]},column:{0[1]}'.format(tup))
return df.head()
Now when I call function with items.apply(shape_of_df) I get error however if I call function and pass df as parameter it works fine. Please let me know I am missing something very basic when I use df.apply() couldn't figure out in docs
shape_of_df(items) # this works fine prints shape and df.head()