Error-"'Column' object is not callable".
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2023 09:43 AM
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
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2023 08:16 PM
Hi @Himadri Verma
Hope this below suggestion will help you in pyspark.Please let me know if you are looking for something else
Happy Learning!!
Thanks for reading and like if this is useful and for improvements or feedback please comment.