How can I create a multidict with data from excel file?
回答済みHello everyone,
I started computing data by myself like this:
jobs, endate , qty, pph, setup, weight = gp.multidict({
('1'): [date(2022,1,5), 7111, 160, 10, 5],
('2'): [date(2022,1,5), 2801, 180, 10, 1],
('3'): [date(2022,1,5), 5432, 100, 10, 6]
})
in order to create a multidict.
Now, I want to create the same (a multidict) but from data export from an excel. I tried this:
df3.to_dict()["jobs"]
but I only can added one key value as "jobs". I want to add more values: endate , qty, pph, setup and weight as I done in the first example manually.
Thank you!
0
-
正式なコメント
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support. -
Hi Susana,
One possible way would be to read your excel data column by column or sheet by sheet and move the respective entries into lists in a correct order. Then, you can construct the multidict by using all of the lists you constructed.
Best regards,
Jaromił1
投稿コメントは受け付けていません。
コメント
2件のコメント