cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

Error-"'Column' object is not callable".

hv
New Contributor

I am trying to lowercase one of the columns(A_description) of a dataframe(df) and getting the error-"'Column' object is not callable".

Code: def new_desc():

  for line in df:

    line = df['A_description'].map(str.lower)

  return line 

new_desc()

Have used the following methods:

.str.lower()

.apply(str.lower)

.apply(lambda x: x.lower())

.map(str.lower)

All gave the same error.

1 REPLY 1

Chaitanya_Raju
Honored Contributor

Hi @Himadri Verma​ 

Hope this below suggestion will help you in pyspark.Please let me know if you are looking for something else

image.pngHappy Learning!!

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.