Demo entry 6768098

test

   

Submitted by anonymous on Nov 01, 2018 at 08:39
Language: Python. Code size: 411 Bytes.

# la colonne contient "hair" (attention: prendra par exemple "mohair")
df[df['name'].str.contains('hair')]

# la colonne contient "hair" ou "tif"
df[df['name'].str.contains('hair|tif')]

# la colonne correspond exactement à «Genève»
df[df['name'] == 'Genève']

# une colonne correspond à Genève, une autre contient «Boulevard»
df[ (df['localité'] == 'Genève') & (df['rue'].str.contains('Boulevard')) ]

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).