Answer the question
In order to leave comments, you need to log in
How to check an Excel table in Python, if the given value is in the table - display the entire row?
Let's say I enter a value in the python
name = input ()
I need the python to check the cells of the 1st column, if there is a name in this column, it displays the entire line.
Here is an excel file 'baza' as an example, it has a table with fighters)
Let's say I want to check Anton's history, I enter 'anton', from python I want to get such a verified list:
anton green not rivers Morgunov 02.12.2020
anton red rather rivers Safonova 12.12.2020
anton green is strong Ivanov 12.15.2020
anton yellow rather Ivanov rivers 12.19.2020
Answer the question
In order to leave comments, you need to log in
it's easier to import Excel into a dataframe through pandas than to open it through some Python Excel module and work with columns, cells
df1=pandas.read_excel(путь, header=0)
print (df1.loc[df1['Боец']=='антон'])
List=df1.to_numpy().tolist()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question