UserYmY
UserYmY

Reputation: 8554

Python pandas: Select columns that their content does not contain a value

I would like to do the opposite of this :

data[data.ip.str.contains(':')]

Any ideas?

Upvotes: 1

Views: 1028

Answers (1)

kennes
kennes

Reputation: 2145

Use the ~ character like so:

data[~data.ip.str.contains(':')]

Upvotes: 2

Related Questions