From 697761ccad75aceb00a12e028863719d7437c44d Mon Sep 17 00:00:00 2001 From: andersonfrailey Date: Wed, 13 Sep 2023 17:01:41 -0400 Subject: [PATCH] Sort PUF columns --- taxdata/puf/finalprep.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/taxdata/puf/finalprep.py b/taxdata/puf/finalprep.py index aa41ec92..35fb1806 100644 --- a/taxdata/puf/finalprep.py +++ b/taxdata/puf/finalprep.py @@ -74,6 +74,9 @@ def finalprep(data): # - Rename 'filer' to 'data_source' data = data.rename(columns={"filer": "data_source"}) + # - Sort columns to ensure every PUF is the same + data.sort_index(axis=1, inplace=True) + return data