DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
pandas dataframe mask all entries which include a string
In [3]: df[df['ids'].str.contains("ball")] Out[3]: ids vals 0 aball 1 1 bball 2 3 fball 4
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#pandas
#dataframe
#mask
#entries
#include
#string
ADD COMMENT
Topic
COMMENT
Name
6+9 =
Submit