Skip to content

Commit

Permalink
Update openfisca_france_data/erfs_fpr/input_data_builder/step_05_foye…
Browse files Browse the repository at this point in the history
…r.py

Co-authored-by: Mahdi Ben Jelloul <[email protected]>
  • Loading branch information
clallemand and benjello authored Nov 19, 2024
1 parent 01dc48b commit d2937e4
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,15 @@ def build_foyer(temporary_store = None, year = None):
how = "inner"
)

decls['statut_decl1'] = np.where((decls.statut_decl1 != decls.statut_decl2),
np.where(decls.statut_decl1.isin([1,2]) | decls.statut_decl2.isin([1,2]),
1,
8
),
decls.statut_decl1)
decls['statut_decl1'] = np.where(
(decls.statut_decl1 != decls.statut_decl2),
np.where(
decls.statut_decl1.isin([1,2]) | decls.statut_decl2.isin([1,2]),
1,
8
),
decls.statut_decl1
)

assert len(couples[couples.quifam.isin([0])]) == len(decls)
couples = pd.merge(couples,decls[['idfam',"statut_decl1"]],on = 'idfam', how = 'inner')
Expand Down

0 comments on commit d2937e4

Please sign in to comment.