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!!