I am new to python and scripting in general. so if this seems simple I am sorry. I have tried to google etc but not finding what I am after.
- Issue I have a excel sheet that I import
import pandas as pd
path_input = r'C:\Users\XXXXX\PycharmProjects\List.xlsx
From this I can then pull and print any column I like for example below
df = pd.read_excel(path_input)
fqdn = list(df.FQDN)
owner = list(df.Owner)
what I would like to do is only call data where cells in column fqdn is equal to a certain name in column owner.
so that I can then use the fqdn data to eventually run code to login to the devices.
Any help is really appreciated.
example would be pulling
fqdn owner
abc.example.com David
cde.example.com David
Answered - I ended up doing a combination of suggestions but I found this worked for me.
''' new_df = df[df.Owner == 'Name'] new_df1 = new_df.iloc[0:87, 0:1]