Answer the question
In order to leave comments, you need to log in
Finding values in Pandas?
There is a column with values of the form:
Zbx_login
Zbx_login1
Zbx_login2
Elg_login1
Elg_login3
Elg_login2
Answer the question
In order to leave comments, you need to log in
There is a handy function - startswith , it will work well here.
import pandas as pd
df = pd.DataFrame(['Zbx_login', 'Zbx_login1', 'Zbx_login2', 'Elg_login1', 'Elg_login3', 'Elg_login2'], columns=['name'])
df_filtered = df[df.name.str.startswith('Elg_')]
df_filtered
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question