cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
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!!

Thanks for reading and like if this is useful and for improvements or feedback please comment.

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local communityโ€”sign up today to get started!

Sign Up Now