Skip to content

Instantly share code, notes, and snippets.

@jtrive84
Created February 11, 2026 21:06
Show Gist options
  • Select an option

  • Save jtrive84/8bd9ed3d3a5f99d5917601b5e0c9c2a8 to your computer and use it in GitHub Desktop.

Select an option

Save jtrive84/8bd9ed3d3a5f99d5917601b5e0c9c2a8 to your computer and use it in GitHub Desktop.
Filter DataFrame to match conditions specified in a dictionary
inp = {
"BLDGCLASS": "3",
"OCCTYPE": "47",
"NUMSTORIES": "1",
"FLOORAREA": "2500",
"YEARBUILT": "12/31/1985",
"COASTAL_DIST_GRP": "5-25 miles",
#"GU_AAL_RATE": 1.398584,
"FIPSCD": "12071",
"STATECODE": "FL",
"BUILDING_TIV": 1000000,
}
f = fl_actuals.loc[(fl_actuals[list(inp)] == pd.Series(inp)).all(axis=1)]
f.head()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment