Python, Data Science, Data Engineering, Programming, Coding.
Person object with the fields replaced person1 = person1._replace(First_Name='Jane') # Return a new Person object with the fields replaced person1 = person1._replace(Last_Name='Smith') # Return an OrderedDict built from Person print(person1._asdict()) Output: ('First_Name', 'Last_Name')