1

I am trying to convert a python code from field calculator to arcpy (pycharm).

All i am wanting to do is convert the below python code into a way python in pycharm will read it.

!Owner_Ab!.title()

This is my attempt however it does not work.

feature_class = CAD_WA
FukMoO = 'Owner_Ab'


with arcpy.da.UpdateCursor(feature_class, FukMoO) as cursor:
    for row in cursor:
        row[0] = row[0].title
        cursor.updateRow(row)
1
  • 2
    What happens when you run the code that you have presented? Any error message is likely to give a hint as to its cause. Commented Apr 1, 2021 at 7:26

1 Answer 1

3

You are not showing all your code but

row[0].title should be row[0].title()

row = ('does not work',)

print('1:', row[0].title)
print('2:', row[0].title())

1: <built-in method title of str object at 0x7f4ae3465570>
2: Does Not Work

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.