Skip to content

Commit

Permalink
UP solution 2
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinSimonoviez committed Dec 25, 2024
1 parent a82e9e2 commit 0f633c0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pandas_questions.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ def merge_referendum_and_areas(ref, reg_and_dep):
for i in range(ref.shape[0])
if ref.iloc[i, 0] not in
liste_refer_domtom]]
intermed = referendum_metropole['Department code']
for k in range(1, 10):
string = 'Department code'
intermed = referendum_metropole[string].replace(
str(k),
'0'+str(k))
intermed = intermed.replace(
str(k),
'0'+str(k))
referendum_metropole['Department code'] = intermed
return_final = pd.DataFrame(pd.merge(reg_dep_metropole,
referendum_metropole,
Expand Down

0 comments on commit 0f633c0

Please sign in to comment.