Skip to content

Instantly share code, notes, and snippets.

@jtrive84
Created July 26, 2025 13:38
Show Gist options
  • Save jtrive84/3af8aa069d0178b2033107d9a062b4bc to your computer and use it in GitHub Desktop.
Save jtrive84/3af8aa069d0178b2033107d9a062b4bc to your computer and use it in GitHub Desktop.
Create hash of multiple columns in Pandas
dfsf["hash_id"] = pd.util.hash_pandas_object(
dfsf[["FIPSCd", "CountyNm", "PolicyNo", "TermEffectiveDt", "InsuredNm", "TermExpirationDt", "LocationCityNm",
"ZipCd", "LatitudePt", "LongitudePt"]],
index=False
).astype(str)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment