DEV Community

Nilotpal Choudhury
Nilotpal Choudhury

Posted on

Answer: Select by partial string from a pandas DataFrame

Based on github issue #620, it looks like you'll soon be able to do the following:

df[df['A'].str.contains("hello")]

Update: vectorized string methods (i.e., Series.str) are available in pandas 0.8.1 and up.

Top comments (0)