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.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2023 08:16 PM