Jun-22-2022, 10:46 PM
You don't convert to
By the look of your Excels file this should work.
df.to_dict()
this takes it out of Pandas(has a lot of powerš„) and it standard dictionary.By the look of your Excels file this should work.
import pandas as pd df = pd.read_excel("book.xlsx") df_val = df.query('id==1')['Name'] print(df_val) print(d.values[0])