Skip to content

Instantly share code, notes, and snippets.

View Ray-Mangan's full-sized avatar

Ray Mangan Ray-Mangan

View GitHub Profile
@Ray-Mangan
Ray-Mangan / rename_fields.py
Created November 5, 2021 21:42
Rename fields in a GDB feature class
#path to feature class
dataset = r"\\some\directory.gdb\feature_class"
#store new field names and new field aliases in a dictionary
#key is current field name, value is new field name
rename_fields = {
"current_name1":"new_name1",
"current_name2":"new_name2"
}