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.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group