Skip to content

Instantly share code, notes, and snippets.

@netanel246
Created November 12, 2018 12:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save netanel246/ecaf884fa623507f5072150ba67e744f to your computer and use it in GitHub Desktop.
Save netanel246/ecaf884fa623507f5072150ba67e744f to your computer and use it in GitHub Desktop.
Pandas Useful Tricks
import pandas as pd
# Search '>' over all the values of the whole dataframe
res = df.apply(lambda row: row.astype(str).str.contains('>').any(), axis=1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment