Skip to content

Challenge: ZAIRIyoussef submission#82

Open
ZAIRIyoussef wants to merge 2 commits intogeeksblabla:mainfrom
ZAIRIyoussef:ZAIRIyoussef-patch-1
Open

Challenge: ZAIRIyoussef submission#82
ZAIRIyoussef wants to merge 2 commits intogeeksblabla:mainfrom
ZAIRIyoussef:ZAIRIyoussef-patch-1

Conversation

@ZAIRIyoussef
Copy link
Copy Markdown

No description provided.

@aboullaite
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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