Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Challenge: ZAIRIyoussef submission #82

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ZAIRIyoussef
Copy link

No description provided.

@aboullaite
Copy link
Collaborator

I think there is something wrong with your submission :) you forgot what the file extension 😅

@@ -0,0 +1,44 @@
import csv
from collections import defaultdict
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these imports from standard python libraries ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aboullaite, I'm answering on Youssef's behalf, yes, both are part of the standard Python library

prix_par_ville = defaultdict(float)
prix_par_produit_et_ville = defaultdict(lambda: defaultdict(list))

with open(chemin_fichier, newline='', encoding='utf-8') as csvfile:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this load the whole file in memory ? If yes, it's likely to trigger an OOM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants