Skip to content

Instantly share code, notes, and snippets.

@joaoceron
Created September 16, 2019 08:51
Show Gist options
  • Save joaoceron/43d150b9cac415eae2bfc963760511ea to your computer and use it in GitHub Desktop.
Save joaoceron/43d150b9cac415eae2bfc963760511ea to your computer and use it in GitHub Desktop.
pandas IPv4 address anon
df_flows.dst_ip.replace({r'(\d+)\.(\d+)\.(\d+)\.(\d+)': r'\1.X.X.\4'}, regex=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment