#🔒 Trying to count categories from 2 different .cvs´s
10 messages · Page 1 of 1 (latest)
@graceful spire
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
my message got deleted give me a second (im new btw)
here my csv´s
Mateiralplanzuordnung-KTL.csv:
Material Category1 Category2
15666 True False
13128 False True
Liste-Warentraeger.csv:
Date Material amount
01.02.2023 15666!13128 2!3
02.02.2023 13128 1
now i want to have the following output:
Category Amount
Category1 2
Category2 4
heres my code:
https://paste.pythondiscord.com/IKTQ
thx in advance
category1, category2 = 0,0
for material in second_file:
category = first_file[material]
if category == 1:
category1 += material[count]
else:
category2 += material[count]```
thats the idea yea, but its hard to implement (atleast for me).
First i have to check which categories there are (from first .csv)
Then i have to check which materials were "created" inbetween the wanted time frame.
After that i need to count +1 for every category where a material was found but the information which material belongs to which category is in the first csv and the actual checking if they were created is in the first
could you maybe be a bit more specific? if thats alright
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.