Skip to content

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.

3 participants