# Activate multi-output in notebook
from IPython.core.interactiveshell import InteractiveShell
= "all" InteractiveShell.ast_node_interactivity
Utilisation de Survey Scenario
import numpy as np
import pandas as pd
# Not exported
from openfisca_france_data.model.common import decile_rfr
from openfisca_survey_manager.statshelpers import mark_weighted_percentiles
/tmp/ipykernel_10462/2049846552.py:2: DeprecationWarning:
Pyarrow will become a required dependency of pandas in the next major release of pandas (pandas 3.0),
(to allow more performant data types, such as the Arrow string type, and better interoperability with other libraries)
but was not found to be installed on your system.
If this would cause problems for you,
please provide us feedback at https://github.com/pandas-dev/pandas/issues/54466
import pandas as pd
print(config)
"SURVEY_MANAGER_CONFIG_PATH")
config.get(# cache.clear_cache()
Config loaded from /home/cgl/leximpact/leximpact-so/.env OR/AND environement variables
'/mnt/data-out/leximpact-socio-fiscal-simu-etat/integ'
# NB_FOYER = 40_290_476 # 39_818_220 dans POTE 2020, d'où vient le 40 millions ?
# 2_458_482_400_000.0 != 2_545_026_900_000
# RFR_SUM = 2_458_482_400_000 # 2_545_026_900_000 # 1 104 768 273,172 € de revenus 2020 d'après Bercy
# RFR_SUM = 1_104_768_273_172 # € de revenus 2020 d'après Bercy
# IRPP Brut PLF 2023 : 109_776_000_000 page 26 de PLF-2023.pdf
# IRPP_PLF_2023 = 86_887_586_871 # 86,8 Md€ page 134
# IRPP_AGG = aggregates_sum[1]
# CSG_AGG = aggregates_sum[0]
# tc.assertEqual(IRPP_AGG["2023"], IRPP_PLF_2023)
rounddown
rounddown (number)
Met à 0 60% des chiffres pour ne pas remonter de valeurs personnelles
5124), 5100)
tc.assertEqual(rounddown(-8837.2373046875), -8800) tc.assertEqual(rounddown(
Création de la simulation
C’est là que se fait l’initialisation du Survey Scenario, c’est lui qui va charger les données et prendre en compte les TaxBenefitSystem.
# import os
# import pickle
# def lex_cache(cachefile):
# """
# A function that creates a decorator which will use "cachefile" for caching the results of the decorated function "fn".
# """
# def decorator(fn): # define a decorator for a function "fn"
# def wrapped(
# *args, **kwargs
# ): # define a wrapper that will finally call "fn" with all arguments
# # if cache exists -> load it and return its content
# if os.path.exists(cachefile):
# with open(cachefile, "rb") as cachehandle:
# logger.debug("using cached result from '%s'" % cachefile)
# return pickle.load(cachehandle)
# # execute the function with all arguments passed
# res = fn(*args, **kwargs)
# # write to cache file
# with open(cachefile, "wb") as cachehandle:
# print("saving result to cache '%s'" % cachefile)
# pickle.dump(res, cachehandle)
# return res
# return wrapped
# return decorator # return this "customized" decorator that uses "cachefile"
# !rm /tmp/create_survey_scenario.tmp
get_tax_benefit_systems
get_amendement_tax_benefit_system
get_amendement_tax_benefit_system (reformParameters, scenario)
get_tax_benefit_systems
get_tax_benefit_systems (reformParameters)
Création du Survey Scenario
delete_survey_scenario
delete_survey_scenario ()
get_survey_scenario
get_survey_scenario (request:leximpact_socio_fisca_simu_etat.schema.Refo rmeSocioFiscale, dump_suffix:str='')
Met à jour le survey_scenario s’il existe déjà pour cette période.
create_survey_scenario
create_survey_scenario (period:str, baseline_tax_benefit_system:openfisca _core.taxbenefitsystems.tax_benefit_system.TaxBen efitSystem, amendement_tax_benefit_system:Optiona l[openfisca_core.taxbenefitsystems.tax_benefit_sy stem.TaxBenefitSystem], plf_tax_benefit_system:Op tional[openfisca_core.taxbenefitsystems.tax_benef it_system.TaxBenefitSystem], dump_suffix:str='')
Create OpenFisca simulation from data.
Calcul une réforme
Ici on combine les méthodes ci-dessus pour obtenir le résultat. Le montant de la réforme est extrapolé à la France entière en utilisant le “poids” de l’individu dans la population française pour obtenir le montant global pour l’Etat.
Sans Survey Scenario nous faisions: - Calcul de la base => Renvoie du résultat - Calcul du PLF => Renvoie du résultat - Calcul de l’amendement => Renvoie du résultat
Avec Survey Scenario, il faut : - Calcul de la base et du PLF et de l’amendement => Renvoie des 3 résultats
add_default_to_quantiles
add_default_to_quantiles
add_default_to_quantiles (quantiles:List, variable)
For compatibility issue we add a default variable equal to the max value.
return: - Modified quantiles Warning : the input quantiles is also modified !
= [{"rfr_max": -1234.56778}, {"rfr_max": 30}]
quantiles = await add_default_to_quantiles(quantiles, "rfr")
_ 0]["rfr_max"], -1200)
tc.assertEqual(quantiles[1]["rfr_max"], 1e15) tc.assertEqual(quantiles[
winners_loosers
winners_loosers
winners_loosers (scenario:leximpact_survey_scenario.leximpact_survey_scen ario.LeximpactErfsSurveyScenario, variable:str, mode:str, annee_de_calcul:int)
Compute winners and loosers for a given variable. mode: “base” or “plf” or “amendement_base” or “amendement_plf”
Calcul des quantiles
compute_quantile
compute_quantile (scenario, variables, by, plf_exist, amendement_exist, annee_de_calcul)
Compute quantiles for a given scenario. Return a tuple (quantiles_baseline, quantiles_plf, quantiles_amendement)
### compute_reform
compute_reform
compute_reform (reformParameters:leximpact_socio_fisca_simu_etat.schema.R eformeSocioFiscale, use_cache=True, debug=False, dump_suffix:str='')
Utilise OpenFisca pour effectuer les différentes simulations: - baseline : Le contre-factuel - PLF : Le Projet de Loi de Finances à venir - amendement : L’amendement proposé par le député
Args: ::reformParameters:: ReformeSocioFiscale ::use_cache:: Si on souhaite utiliser le cache ::debug:: Si on souhaite avoir des logs détaillées
Returns: ::simu_baseline:: OneSimulationResult ::simu_plf:: OneSimulationResult ::simu_amendement:: OneSimulationResult ::errors:: List[str]
# annee_de_calcul = 2023
# variables = ["impot_revenu_restant_a_payer"]
# reform_base = ReformeSocioFiscale(
# base=annee_de_calcul,
# amendement={},
# output_variables=variables,
# quantile_base_variable=["decile_rfr"],
# quantile_nb=10,
# quantile_compare_variables=["impot_revenu_restant_a_payer"],
# )
# compute_reform(
# reformParameters=reform_base,
# annee_de_calcul=annee_de_calcul,
# ignore_recalage=True,
# baseline_tax_benefit_system=leximpact_tbs,
# only_above_zero=False,
# use_cache=False,
# debug=True,
# )
Interprète la requête API
### Gestion du cache
# cache.clear_cache()
# # Entrée
# reform = ReformeSocioFiscale(base=2023, amendement={}, output_variables=["impot_revenu_restant_a_payer"])
# # Sorties
# simu_result = OneSimulationResult(state_budget={"base": 50_000_000}, quantiles=[{"fraction":1},{"fraction":2}])
# all_result= AllSimulationResult(result={"base":simu_result}, compare_before_after=None,errors=["Ca marche pas"])
# save_result_to_cache(reform, all_result)
# get_cached_result(reform)
Gestion des nom de variables
fix_variable_name_result
fix_variable_name_result (all_simulation_result:leximpact_socio_fisca_sim u_etat.schema.AllSimulationResult, remove_suffix:bool=True)
fix_variable_name_input
fix_variable_name_input (reform:leximpact_socio_fisca_simu_etat.schema.R eformeSocioFiscale, remove_suffix:bool=False)
fix_variable_name_dict
fix_variable_name_dict (variables:Dict, remove_suffix:bool=False)
Renomme variable OpenFisca si en individu
fix_variable_name_list
fix_variable_name_list (variables:List, remove_suffix:bool=False)
Renomme variable OpenFisca si en individu
fix_variable_name_string
fix_variable_name_string (variable:str, remove_suffix:bool=False)
Renomme variable OpenFisca si en individu
compute_all_simulation
compute_all_simulation
compute_all_simulation (reform:leximpact_socio_fisca_simu_etat.schema.Re formeSocioFiscale, ignore_recalage=False, use_cache=True, dump_suffix:str='')
::reform:: ReformeSocioFiscale ::annee_de_calcul:: str
TESTS
# Delete all survey scenarii
= {} survey_scenarios
Prestations familiales
= 2024
annee_de_calcul = ["revenus_menage_par_uc", "af_menage"]
variables = ReformeSocioFiscale(
reform =annee_de_calcul,
base=2024,
plf={
amendement"prelevements_sociaux.contributions_sociales.csg.remplacement.pensions_retraite_invalidite.imposable.taux_plein": {
"start": "2023-01-01",
"type": "parameter",
"value": 0.1,
}
},=variables,
output_variables=["revenus_menage_par_uc"],
quantile_base_variable=10,
quantile_nb=["af_menage", "revenus_menage"],
quantile_compare_variables="af_menage",
winners_loosers_variable
)= await compute_all_simulation(reform) result
[leximpact-socio-fiscal-simu-etat DEBUG @ 20:29:30] Il faut créer un nouveau survey_scenario ☹
[leximpact-socio-fiscal-simu-etat DEBUG @ 20:29:31] create_survey_scenario - start
[leximpact-socio-fiscal-simu-etat DEBUG @ 20:29:31] create_survey_scenario - dump_directory exists
[leximpact-socio-fiscal-simu-etat DEBUG @ 20:29:35] create_survey_scenario - done
[leximpact-socio-fiscal-simu-etat DEBUG @ 20:29:35] Calcul de variable='revenus_menage_par_uc'
[leximpact-socio-fiscal-simu-etat DEBUG @ 20:29:36] Calcul de variable='af_menage'
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_france/model/prelevements_obligatoires/prelevements_sociaux/cotisations_sociales/travail_non_salarie.py:199: RuntimeWarning: divide by zero encountered in divide
- (0.007 * (assiette_pss > 5) * ((assiette_pss - 5) / assiette_pss))
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_france/model/prelevements_obligatoires/prelevements_sociaux/cotisations_sociales/travail_non_salarie.py:199: RuntimeWarning: invalid value encountered in multiply
- (0.007 * (assiette_pss > 5) * ((assiette_pss - 5) / assiette_pss))
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:486: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
/home/cgl/leximpact/leximpact-socio-fiscal-simu-etat/.venv/lib/python3.10/site-packages/openfisca_survey_manager/simulations.py:472: FutureWarning: A value is trying to be set on a copy of a DataFrame or Series through chained assignment using an inplace method.
The behavior will change in pandas 3.0. This inplace method will never work because the intermediate object on which we are setting values always behaves as a copy.
For example, when doing 'df[col].method(value, inplace=True)', try using 'df.method({col: value}, inplace=True)' or df[col] = df[col].method(value) instead, to perform the operation inplace on the original object.
data_frame[value].fillna(missing_variable_default_value, inplace = True)
[leximpact-socio-fiscal-simu-etat DEBUG @ 20:29:58] compute_reform - Temps de traitement pour une simulation 28.678424868000093 secondes.
[leximpact-socio-fiscal-simu-etat DEBUG @ 20:29:58] Temps de traitement total pour la simulation 28.679307769999923 secondes. Annee TBS 2024
WARNING: no data for 2024, will took 2021
Données du scénario :
{'input_data_table_by_entity_by_period': {2024: {'individu': 'individu_2021', 'famille': 'famille_2021', 'foyer_fiscal': 'foyer_fiscal_2021', 'menage': 'menage_2021'}}, 'survey': 'leximpact_2021', 'config_files_directory': '/mnt/data-out/leximpact-socio-fiscal-simu-etat/integ'}
= result.result["base"].quantiles test
CSG
Sans réforme
= ReformeSocioFiscale(
reform =2024,
base=["csg_imposable_salaire"],
output_variables
)= await compute_all_simulation(reform)
resultat
= resultat.result["base"].state_budget["csg_imposable_salaire"]
csg_imposable_salaire # assert -70 * 1e9 > csg_imposable_salaire > -80 * 1e9
print(f"{csg_imposable_salaire=:,.0}")
[leximpact-socio-fiscal-simu-etat DEBUG @ 20:31:16] Calcul de variable='csg_imposable_salaire_foyer_fiscal'
[leximpact-socio-fiscal-simu-etat DEBUG @ 20:31:16] compute_reform - Temps de traitement pour une simulation 0.5025315759999103 secondes.
[leximpact-socio-fiscal-simu-etat DEBUG @ 20:31:16] Temps de traitement total pour la simulation 0.5033850670001812 secondes. Annee TBS 2024
csg_imposable_salaire=-2e+10
2024].tax_benefit_systems["amendement"] survey_scenarios[
<leximpact_socio_fisca_simu_etat.prepare_reform.CustomReform at 0x7f9b983742e0>
#### Test AsyncIO Cancel
# reform = ReformeSocioFiscale(
# base=2023,
# output_variables=["csg_imposable_salaire"],
# )
# task = asyncio.Task(compute_all_simulation(reform))
# await asyncio.sleep(3)
# task.cancel()
# resultat = await task
# csg_imposable_salaire = resultat.result["base"].state_budget["csg_imposable_salaire"]
# # assert -70 * 1e9 > csg_imposable_salaire > -80 * 1e9
# print(f"{csg_imposable_salaire=:,.0}")
Avec réforme et quantiles
= 2024
annee_de_calcul = [
variables "rfr",
"csg_deductible_retraite_foyer_fiscal",
"csg_imposable_retraite_foyer_fiscal",
]= ReformeSocioFiscale(
reform =annee_de_calcul,
base=2024,
plf={
amendement"prelevements_sociaux.contributions_sociales.csg.remplacement.pensions_retraite_invalidite.imposable.taux_plein": {
"start": "2023-01-01",
"type": "parameter",
"value": 0.1,
}
},=variables,
output_variables=["rfr_par_part"],
quantile_base_variable=10,
quantile_nb=[
quantile_compare_variables"csg_deductible_retraite_foyer_fiscal",
"csg_imposable_retraite_foyer_fiscal",
"rfr",
],="csg_retraite_foyer_fiscal",
winners_loosers_variable
)= await compute_all_simulation(reform) result
[leximpact-socio-fiscal-simu-etat DEBUG @ 20:31:53] Pas de création de survey_scenario, on le récupère dans la mémoire 👍
[leximpact-socio-fiscal-simu-etat DEBUG @ 20:32:20] Calcul de variable='rfr'
[leximpact-socio-fiscal-simu-etat DEBUG @ 20:32:21] Calcul de variable='csg_deductible_retraite_foyer_fiscal'
[leximpact-socio-fiscal-simu-etat DEBUG @ 20:32:21] Calcul de variable='csg_imposable_retraite_foyer_fiscal'
result.errors"base"].state_budget
result.result["plf"].state_budget
result.result["amendement"].state_budget result.result[
[]
{'rfr': 1157143184927.2537,
'csg_deductible_retraite': -17510267271.987976,
'csg_imposable_retraite': -7268176422.030207}
{'rfr': 1155359220747.6218,
'csg_deductible_retraite': -17510267271.987976,
'csg_imposable_retraite': -7268176422.030207}
{'rfr': 1155359220747.6218,
'csg_deductible_retraite': -17510267271.987976,
'csg_imposable_retraite': -21070718090.210606}
= 2024
annee_de_calcul = [
variables "rfr",
"csg_deductible_retraite_foyer_fiscal",
"csg_imposable_retraite_foyer_fiscal",
]= ReformeSocioFiscale(
reform =annee_de_calcul,
base={
amendement"prelevements_sociaux.contributions_sociales.csg.remplacement.pensions_retraite_invalidite.imposable.taux_plein": {
"start": "2023-01-01",
"type": "parameter",
"value": 0.1,
}
},=variables,
output_variables=["rfr_par_part"],
quantile_base_variable=10,
quantile_nb=[
quantile_compare_variables"csg_deductible_retraite_foyer_fiscal",
"csg_imposable_retraite_foyer_fiscal",
"rfr",
],="csg_retraite_foyer_fiscal",
winners_loosers_variable
)= await compute_all_simulation(reform) result
"plf"].compare_before_after
result.result["amendement"].compare_before_after
result.result[
tc.assertGreater("amendement"].compare_before_after["amendement_plf"].lower_after,
result.result["plf"].compare_before_after["plf"].lower_after,
result.result[ )
{'plf': CompareBeforeAfter(total=32417039, non_zero_before=30964374, non_zero_after=30958403, above_after=0, lower_after=683663, neutral=31733376, tolerance_factor_used=0.05, weight_factor=1.0)}
{'amendement_plf': CompareBeforeAfter(total=32417039, non_zero_before=30958403, non_zero_after=30958403, above_after=0, lower_after=0, neutral=32417039, tolerance_factor_used=0.05, weight_factor=1.0),
'amendement_base': CompareBeforeAfter(total=32417039, non_zero_before=30964374, non_zero_after=30958403, above_after=0, lower_after=683663, neutral=31733376, tolerance_factor_used=0.05, weight_factor=1.0)}
AssertionError: 0 not greater than 683663
"plf"].quantiles[5] result.result[
{'csg_deductible_retraite_max': 0.0,
'csg_deductible_retraite_mean': -690.0,
'csg_deductible_retraite_min': -6600.0,
'csg_deductible_retraite_sum': -2260000000.0,
'csg_deductible_retraite_count': 3240000.0,
'csg_deductible_retraite_sum_abs': 2260000000.0,
'csg_imposable_retraite_max': 0.0,
'csg_imposable_retraite_mean': -360.0,
'csg_imposable_retraite_min': -2600.0,
'csg_imposable_retraite_sum': -1170000000.0,
'csg_imposable_retraite_count': 3240000.0,
'csg_imposable_retraite_sum_abs': 1170000000.0,
'rfr_max': 100000.0,
'rfr_mean': 31000.0,
'rfr_min': 17000.0,
'rfr_sum': 101500000000.0,
'rfr_count': 3240000.0,
'rfr_sum_abs': 101500000000.0,
'rfr_par_part_max': 20000.0,
'rfr_par_part_mean': 18000.0,
'rfr_par_part_min': 16000.0,
'rfr_par_part_sum': 60220000000.0,
'rfr_par_part_count': 3240000.0,
'rfr_par_part_sum_abs': 60220000000.0,
'count': 3240000.0,
'quantile_num': 6.0,
'fraction': 0.0}
Impôt
= 2024
annee_de_calcul = ["rfr_par_part", "impot_revenu_restant_a_payer"]
variables
= ReformeSocioFiscale(
reform =annee_de_calcul,
base=2024,
plf={
amendement"impot_revenu.bareme_ir_depuis_1945.bareme": {
"scale": [
"rate": {"value": 0}, "threshold": {"value": 0}},
{"rate": {"value": 0.11}, "threshold": {"value": 11294}},
{"rate": {"value": 0.3}, "threshold": {"value": 28797}},
{"rate": {"value": 0.41}, "threshold": {"value": 82341}},
{"rate": {"value": 0.45}, "threshold": {"value": 177106}},
{
],"start": "2024-01-01",
"type": "scale",
"variable": "irpp_economique",
}
},=variables,
output_variables=["rfr_par_part"],
quantile_base_variable=10,
quantile_nb=["impot_revenu_restant_a_payer"],
quantile_compare_variables
)= await compute_all_simulation(reform) result
[leximpact-socio-fiscal-simu-etat DEBUG @ 11:48:10] Pas de création de survey_scenario, on le récupère dans la mémoire 👍
[leximpact-socio-fiscal-simu-etat DEBUG @ 11:48:16] Calcul de variable='rfr_par_part'
[leximpact-socio-fiscal-simu-etat DEBUG @ 11:48:17] Calcul de variable='impot_revenu_restant_a_payer'
[leximpact-socio-fiscal-simu-etat DEBUG @ 11:48:23] compute_reform - Temps de traitement pour une simulation 12.605092303000106 secondes.
[leximpact-socio-fiscal-simu-etat DEBUG @ 11:48:23] Temps de traitement total pour la simulation 12.606172310000034 secondes. Annee TBS 2024
result"amendement"].compare_before_after result.result[
AllSimulationResult(result={'base': OneSimulationResult(state_budget={'rfr_par_part': 706279997369.7501, 'impot_revenu_restant_a_payer': -104809340200.57452}, quantiles=[{'impot_revenu_restant_a_payer_max': 13000.0, 'impot_revenu_restant_a_payer_mean': 100.0, 'impot_revenu_restant_a_payer_min': 0.0, 'impot_revenu_restant_a_payer_sum': 350000000.0, 'impot_revenu_restant_a_payer_count': 3240000.0, 'impot_revenu_restant_a_payer_sum_abs': 350000000.0, 'rfr_par_part_max': 3900.0, 'rfr_par_part_mean': 1000.0, 'rfr_par_part_min': 0.0, 'rfr_par_part_sum': 3400000000.0, 'rfr_par_part_count': 3240000.0, 'rfr_par_part_sum_abs': 3400000000.0, 'count': 3240000.0, 'quantile_num': 1.0, 'fraction': 0.0}, {'impot_revenu_restant_a_payer_max': 10000.0, 'impot_revenu_restant_a_payer_mean': 150.0, 'impot_revenu_restant_a_payer_min': -950.0, 'impot_revenu_restant_a_payer_sum': 501000000.0, 'impot_revenu_restant_a_payer_count': 3240000.0, 'impot_revenu_restant_a_payer_sum_abs': 503000000.0, 'rfr_par_part_max': 8200.0, 'rfr_par_part_mean': 6300.0, 'rfr_par_part_min': 3900.0, 'rfr_par_part_sum': 20500000000.0, 'rfr_par_part_count': 3240000.0, 'rfr_par_part_sum_abs': 20500000000.0, 'count': 3240000.0, 'quantile_num': 2.0, 'fraction': 0.0}, {'impot_revenu_restant_a_payer_max': 9500.0, 'impot_revenu_restant_a_payer_mean': 170.0, 'impot_revenu_restant_a_payer_min': -110.0, 'impot_revenu_restant_a_payer_sum': 569000000.0, 'impot_revenu_restant_a_payer_count': 3240000.0, 'impot_revenu_restant_a_payer_sum_abs': 569000000.0, 'rfr_par_part_max': 11000.0, 'rfr_par_part_mean': 9800.0, 'rfr_par_part_min': 8200.0, 'rfr_par_part_sum': 31850000000.0, 'rfr_par_part_count': 3240000.0, 'rfr_par_part_sum_abs': 31850000000.0, 'count': 3240000.0, 'quantile_num': 3.0, 'fraction': 0.0}, {'impot_revenu_restant_a_payer_max': 11000.0, 'impot_revenu_restant_a_payer_mean': 180.0, 'impot_revenu_restant_a_payer_min': -2000.0, 'impot_revenu_restant_a_payer_sum': 614000000.0, 'impot_revenu_restant_a_payer_count': 3240000.0, 'impot_revenu_restant_a_payer_sum_abs': 748000000.0, 'rfr_par_part_max': 14000.0, 'rfr_par_part_mean': 12000.0, 'rfr_par_part_min': 11000.0, 'rfr_par_part_sum': 41390000000.0, 'rfr_par_part_count': 3240000.0, 'rfr_par_part_sum_abs': 41390000000.0, 'count': 3240000.0, 'quantile_num': 4.0, 'fraction': 0.0}, {'impot_revenu_restant_a_payer_max': 9000.0, 'impot_revenu_restant_a_payer_mean': -160.0, 'impot_revenu_restant_a_payer_min': -4400.0, 'impot_revenu_restant_a_payer_sum': -522000000.0, 'impot_revenu_restant_a_payer_count': 3240000.0, 'impot_revenu_restant_a_payer_sum_abs': 1640000000.0, 'rfr_par_part_max': 17000.0, 'rfr_par_part_mean': 15000.0, 'rfr_par_part_min': 14000.0, 'rfr_par_part_sum': 50900000000.0, 'rfr_par_part_count': 3240000.0, 'rfr_par_part_sum_abs': 50900000000.0, 'count': 3240000.0, 'quantile_num': 5.0, 'fraction': 0.0}, {'impot_revenu_restant_a_payer_max': 9800.0, 'impot_revenu_restant_a_payer_mean': -880.0, 'impot_revenu_restant_a_payer_min': -10000.0, 'impot_revenu_restant_a_payer_sum': -2860000000.0, 'impot_revenu_restant_a_payer_count': 3240000.0, 'impot_revenu_restant_a_payer_sum_abs': 3630000000.0, 'rfr_par_part_max': 20000.0, 'rfr_par_part_mean': 18000.0, 'rfr_par_part_min': 17000.0, 'rfr_par_part_sum': 60310000000.0, 'rfr_par_part_count': 3240000.0, 'rfr_par_part_sum_abs': 60310000000.0, 'count': 3240000.0, 'quantile_num': 6.0, 'fraction': 0.0}, {'impot_revenu_restant_a_payer_max': 10000.0, 'impot_revenu_restant_a_payer_mean': -1700.0, 'impot_revenu_restant_a_payer_min': -15000.0, 'impot_revenu_restant_a_payer_sum': -5720000000.0, 'impot_revenu_restant_a_payer_count': 3240000.0, 'impot_revenu_restant_a_payer_sum_abs': 6370000000.0, 'rfr_par_part_max': 23000.0, 'rfr_par_part_mean': 21000.0, 'rfr_par_part_min': 20000.0, 'rfr_par_part_sum': 71120000000.0, 'rfr_par_part_count': 3240000.0, 'rfr_par_part_sum_abs': 71120000000.0, 'count': 3240000.0, 'quantile_num': 7.0, 'fraction': 0.0}, {'impot_revenu_restant_a_payer_max': 9200.0, 'impot_revenu_restant_a_payer_mean': -3300.0, 'impot_revenu_restant_a_payer_min': -28000.0, 'impot_revenu_restant_a_payer_sum': -10700000000.0, 'impot_revenu_restant_a_payer_count': 3240000.0, 'impot_revenu_restant_a_payer_sum_abs': 11220000000.0, 'rfr_par_part_max': 29000.0, 'rfr_par_part_mean': 26000.0, 'rfr_par_part_min': 23000.0, 'rfr_par_part_sum': 86220000000.0, 'rfr_par_part_count': 3240000.0, 'rfr_par_part_sum_abs': 86220000000.0, 'count': 3240000.0, 'quantile_num': 8.0, 'fraction': 0.0}, {'impot_revenu_restant_a_payer_max': 12000.0, 'impot_revenu_restant_a_payer_mean': -6400.0, 'impot_revenu_restant_a_payer_min': -47000.0, 'impot_revenu_restant_a_payer_sum': -20860000000.0, 'impot_revenu_restant_a_payer_count': 3240000.0, 'impot_revenu_restant_a_payer_sum_abs': 21220000000.0, 'rfr_par_part_max': 40000.0, 'rfr_par_part_mean': 34000.0, 'rfr_par_part_min': 29000.0, 'rfr_par_part_sum': 111400000000.0, 'rfr_par_part_count': 3240000.0, 'rfr_par_part_sum_abs': 111400000000.0, 'count': 3240000.0, 'quantile_num': 9.0, 'fraction': 0.0}, {'impot_revenu_restant_a_payer_max': 150000.0, 'impot_revenu_restant_a_payer_mean': -20000.0, 'impot_revenu_restant_a_payer_min': -1370000.0, 'impot_revenu_restant_a_payer_sum': -66150000000.0, 'impot_revenu_restant_a_payer_count': 3240000.0, 'impot_revenu_restant_a_payer_sum_abs': 67460000000.0, 'rfr_par_part_max': 3680000.0, 'rfr_par_part_mean': 70000.0, 'rfr_par_part_min': 40000.0, 'rfr_par_part_sum': 229000000000.0, 'rfr_par_part_count': 3240000.0, 'rfr_par_part_sum_abs': 229000000000.0, 'count': 3240000.0, 'quantile_num': 10.0, 'fraction': 1.0, 'rfr_max': 1000000000000000.0}], compare_before_after={'base': CompareBeforeAfter(total=32417039, non_zero_before=20655079, non_zero_after=20655079, above_after=0, lower_after=0, neutral=32417039, tolerance_factor_used=0.05, weight_factor=1.0)}), 'plf': OneSimulationResult(state_budget={'rfr_par_part': 705043993433.5272, 'impot_revenu_restant_a_payer': -88021274501.8159}, quantiles=[{'impot_revenu_restant_a_payer_max': 12000.0, 'impot_revenu_restant_a_payer_mean': 97.0, 'impot_revenu_restant_a_payer_min': 0.0, 'impot_revenu_restant_a_payer_sum': 314000000.0, 'impot_revenu_restant_a_payer_count': 3240000.0, 'impot_revenu_restant_a_payer_sum_abs': 314000000.0, 'rfr_par_part_max': 3900.0, 'rfr_par_part_mean': 1000.0, 'rfr_par_part_min': 0.0, 'rfr_par_part_sum': 3350000000.0, 'rfr_par_part_count': 3240000.0, 'rfr_par_part_sum_abs': 3350000000.0, 'count': 3240000.0, 'quantile_num': 1.0, 'fraction': 0.0}, {'impot_revenu_restant_a_payer_max': 9300.0, 'impot_revenu_restant_a_payer_mean': 130.0, 'impot_revenu_restant_a_payer_min': -850.0, 'impot_revenu_restant_a_payer_sum': 450000000.0, 'impot_revenu_restant_a_payer_count': 3240000.0, 'impot_revenu_restant_a_payer_sum_abs': 451000000.0, 'rfr_par_part_max': 8200.0, 'rfr_par_part_mean': 6200.0, 'rfr_par_part_min': 3800.0, 'rfr_par_part_sum': 20340000000.0, 'rfr_par_part_count': 3240000.0, 'rfr_par_part_sum_abs': 20340000000.0, 'count': 3240000.0, 'quantile_num': 2.0, 'fraction': 0.0}, {'impot_revenu_restant_a_payer_max': 8600.0, 'impot_revenu_restant_a_payer_mean': 150.0, 'impot_revenu_restant_a_payer_min': -100.0, 'impot_revenu_restant_a_payer_sum': 510000000.0, 'impot_revenu_restant_a_payer_count': 3240000.0, 'impot_revenu_restant_a_payer_sum_abs': 511000000.0, 'rfr_par_part_max': 11000.0, 'rfr_par_part_mean': 9700.0, 'rfr_par_part_min': 7500.0, 'rfr_par_part_sum': 31670000000.0, 'rfr_par_part_count': 3240000.0, 'rfr_par_part_sum_abs': 31670000000.0, 'count': 3240000.0, 'quantile_num': 3.0, 'fraction': 0.0}, {'impot_revenu_restant_a_payer_max': 10000.0, 'impot_revenu_restant_a_payer_mean': 180.0, 'impot_revenu_restant_a_payer_min': -1300.0, 'impot_revenu_restant_a_payer_sum': 601000000.0, 'impot_revenu_restant_a_payer_count': 3240000.0, 'impot_revenu_restant_a_payer_sum_abs': 635000000.0, 'rfr_par_part_max': 14000.0, 'rfr_par_part_mean': 12000.0, 'rfr_par_part_min': 11000.0, 'rfr_par_part_sum': 41230000000.0, 'rfr_par_part_count': 3240000.0, 'rfr_par_part_sum_abs': 41230000000.0, 'count': 3240000.0, 'quantile_num': 4.0, 'fraction': 0.0}, {'impot_revenu_restant_a_payer_max': 8300.0, 'impot_revenu_restant_a_payer_mean': -13.0, 'impot_revenu_restant_a_payer_min': -3200.0, 'impot_revenu_restant_a_payer_sum': -44900000.0, 'impot_revenu_restant_a_payer_count': 3240000.0, 'impot_revenu_restant_a_payer_sum_abs': 1120000000.0, 'rfr_par_part_max': 17000.0, 'rfr_par_part_mean': 15000.0, 'rfr_par_part_min': 13000.0, 'rfr_par_part_sum': 50680000000.0, 'rfr_par_part_count': 3240000.0, 'rfr_par_part_sum_abs': 50680000000.0, 'count': 3240000.0, 'quantile_num': 5.0, 'fraction': 0.0}, {'impot_revenu_restant_a_payer_max': 8800.0, 'impot_revenu_restant_a_payer_mean': -590.0, 'impot_revenu_restant_a_payer_min': -8100.0, 'impot_revenu_restant_a_payer_sum': -1940000000.0, 'impot_revenu_restant_a_payer_count': 3240000.0, 'impot_revenu_restant_a_payer_sum_abs': 2720000000.0, 'rfr_par_part_max': 20000.0, 'rfr_par_part_mean': 18000.0, 'rfr_par_part_min': 16000.0, 'rfr_par_part_sum': 60220000000.0, 'rfr_par_part_count': 3240000.0, 'rfr_par_part_sum_abs': 60220000000.0, 'count': 3240000.0, 'quantile_num': 6.0, 'fraction': 0.0}, {'impot_revenu_restant_a_payer_max': 9200.0, 'impot_revenu_restant_a_payer_mean': -1300.0, 'impot_revenu_restant_a_payer_min': -12000.0, 'impot_revenu_restant_a_payer_sum': -4440000000.0, 'impot_revenu_restant_a_payer_count': 3240000.0, 'impot_revenu_restant_a_payer_sum_abs': 5090000000.0, 'rfr_par_part_max': 23000.0, 'rfr_par_part_mean': 21000.0, 'rfr_par_part_min': 20000.0, 'rfr_par_part_sum': 71060000000.0, 'rfr_par_part_count': 3240000.0, 'rfr_par_part_sum_abs': 71060000000.0, 'count': 3240000.0, 'quantile_num': 7.0, 'fraction': 0.0}, {'impot_revenu_restant_a_payer_max': 8300.0, 'impot_revenu_restant_a_payer_mean': -2600.0, 'impot_revenu_restant_a_payer_min': -23000.0, 'impot_revenu_restant_a_payer_sum': -8620000000.0, 'impot_revenu_restant_a_payer_count': 3240000.0, 'impot_revenu_restant_a_payer_sum_abs': 9130000000.0, 'rfr_par_part_max': 29000.0, 'rfr_par_part_mean': 26000.0, 'rfr_par_part_min': 23000.0, 'rfr_par_part_sum': 86050000000.0, 'rfr_par_part_count': 3240000.0, 'rfr_par_part_sum_abs': 86050000000.0, 'count': 3240000.0, 'quantile_num': 8.0, 'fraction': 0.0}, {'impot_revenu_restant_a_payer_max': 11000.0, 'impot_revenu_restant_a_payer_mean': -5300.0, 'impot_revenu_restant_a_payer_min': -40000.0, 'impot_revenu_restant_a_payer_sum': -17280000000.0, 'impot_revenu_restant_a_payer_count': 3240000.0, 'impot_revenu_restant_a_payer_sum_abs': 17640000000.0, 'rfr_par_part_max': 40000.0, 'rfr_par_part_mean': 34000.0, 'rfr_par_part_min': 29000.0, 'rfr_par_part_sum': 111400000000.0, 'rfr_par_part_count': 3240000.0, 'rfr_par_part_sum_abs': 111400000000.0, 'count': 3240000.0, 'quantile_num': 9.0, 'fraction': 0.0}, {'impot_revenu_restant_a_payer_max': 140000.0, 'impot_revenu_restant_a_payer_mean': -17000.0, 'impot_revenu_restant_a_payer_min': -1230000.0, 'impot_revenu_restant_a_payer_sum': -57550000000.0, 'impot_revenu_restant_a_payer_count': 3240000.0, 'impot_revenu_restant_a_payer_sum_abs': 58770000000.0, 'rfr_par_part_max': 3680000.0, 'rfr_par_part_mean': 70000.0, 'rfr_par_part_min': 40000.0, 'rfr_par_part_sum': 228900000000.0, 'rfr_par_part_count': 3240000.0, 'rfr_par_part_sum_abs': 228900000000.0, 'count': 3240000.0, 'quantile_num': 10.0, 'fraction': 1.0, 'rfr_max': 1000000000000000.0}], compare_before_after={'plf': CompareBeforeAfter(total=32417039, non_zero_before=20655079, non_zero_after=19944667, above_after=17488305, lower_after=2948051, neutral=11980682, tolerance_factor_used=0.05, weight_factor=1.0)}), 'amendement': OneSimulationResult(state_budget={'rfr_par_part': 705043993433.5272, 'impot_revenu_restant_a_payer': -94099999988.76035}, quantiles=[{'impot_revenu_restant_a_payer_max': 12000.0, 'impot_revenu_restant_a_payer_mean': 100.0, 'impot_revenu_restant_a_payer_min': 0.0, 'impot_revenu_restant_a_payer_sum': 336000000.0, 'impot_revenu_restant_a_payer_count': 3240000.0, 'impot_revenu_restant_a_payer_sum_abs': 336000000.0, 'rfr_par_part_max': 3900.0, 'rfr_par_part_mean': 1000.0, 'rfr_par_part_min': 0.0, 'rfr_par_part_sum': 3350000000.0, 'rfr_par_part_count': 3240000.0, 'rfr_par_part_sum_abs': 3350000000.0, 'count': 3240000.0, 'quantile_num': 1.0, 'fraction': 0.0}, {'impot_revenu_restant_a_payer_max': 10000.0, 'impot_revenu_restant_a_payer_mean': 140.0, 'impot_revenu_restant_a_payer_min': -910.0, 'impot_revenu_restant_a_payer_sum': 481000000.0, 'impot_revenu_restant_a_payer_count': 3240000.0, 'impot_revenu_restant_a_payer_sum_abs': 482000000.0, 'rfr_par_part_max': 8200.0, 'rfr_par_part_mean': 6200.0, 'rfr_par_part_min': 3800.0, 'rfr_par_part_sum': 20340000000.0, 'rfr_par_part_count': 3240000.0, 'rfr_par_part_sum_abs': 20340000000.0, 'count': 3240000.0, 'quantile_num': 2.0, 'fraction': 0.0}, {'impot_revenu_restant_a_payer_max': 9200.0, 'impot_revenu_restant_a_payer_mean': 160.0, 'impot_revenu_restant_a_payer_min': -100.0, 'impot_revenu_restant_a_payer_sum': 546000000.0, 'impot_revenu_restant_a_payer_count': 3240000.0, 'impot_revenu_restant_a_payer_sum_abs': 546000000.0, 'rfr_par_part_max': 11000.0, 'rfr_par_part_mean': 9700.0, 'rfr_par_part_min': 7500.0, 'rfr_par_part_sum': 31670000000.0, 'rfr_par_part_count': 3240000.0, 'rfr_par_part_sum_abs': 31670000000.0, 'count': 3240000.0, 'quantile_num': 3.0, 'fraction': 0.0}, {'impot_revenu_restant_a_payer_max': 11000.0, 'impot_revenu_restant_a_payer_mean': 190.0, 'impot_revenu_restant_a_payer_min': -1400.0, 'impot_revenu_restant_a_payer_sum': 643000000.0, 'impot_revenu_restant_a_payer_count': 3240000.0, 'impot_revenu_restant_a_payer_sum_abs': 679000000.0, 'rfr_par_part_max': 14000.0, 'rfr_par_part_mean': 12000.0, 'rfr_par_part_min': 11000.0, 'rfr_par_part_sum': 41230000000.0, 'rfr_par_part_count': 3240000.0, 'rfr_par_part_sum_abs': 41230000000.0, 'count': 3240000.0, 'quantile_num': 4.0, 'fraction': 0.0}, {'impot_revenu_restant_a_payer_max': 8900.0, 'impot_revenu_restant_a_payer_mean': -14.0, 'impot_revenu_restant_a_payer_min': -3400.0, 'impot_revenu_restant_a_payer_sum': -48000000.0, 'impot_revenu_restant_a_payer_count': 3240000.0, 'impot_revenu_restant_a_payer_sum_abs': 1200000000.0, 'rfr_par_part_max': 17000.0, 'rfr_par_part_mean': 15000.0, 'rfr_par_part_min': 13000.0, 'rfr_par_part_sum': 50680000000.0, 'rfr_par_part_count': 3240000.0, 'rfr_par_part_sum_abs': 50680000000.0, 'count': 3240000.0, 'quantile_num': 5.0, 'fraction': 0.0}, {'impot_revenu_restant_a_payer_max': 9400.0, 'impot_revenu_restant_a_payer_mean': -640.0, 'impot_revenu_restant_a_payer_min': -8700.0, 'impot_revenu_restant_a_payer_sum': -2070000000.0, 'impot_revenu_restant_a_payer_count': 3240000.0, 'impot_revenu_restant_a_payer_sum_abs': 2910000000.0, 'rfr_par_part_max': 20000.0, 'rfr_par_part_mean': 18000.0, 'rfr_par_part_min': 16000.0, 'rfr_par_part_sum': 60220000000.0, 'rfr_par_part_count': 3240000.0, 'rfr_par_part_sum_abs': 60220000000.0, 'count': 3240000.0, 'quantile_num': 6.0, 'fraction': 0.0}, {'impot_revenu_restant_a_payer_max': 9900.0, 'impot_revenu_restant_a_payer_mean': -1400.0, 'impot_revenu_restant_a_payer_min': -13000.0, 'impot_revenu_restant_a_payer_sum': -4740000000.0, 'impot_revenu_restant_a_payer_count': 3240000.0, 'impot_revenu_restant_a_payer_sum_abs': 5440000000.0, 'rfr_par_part_max': 23000.0, 'rfr_par_part_mean': 21000.0, 'rfr_par_part_min': 20000.0, 'rfr_par_part_sum': 71060000000.0, 'rfr_par_part_count': 3240000.0, 'rfr_par_part_sum_abs': 71060000000.0, 'count': 3240000.0, 'quantile_num': 7.0, 'fraction': 0.0}, {'impot_revenu_restant_a_payer_max': 8900.0, 'impot_revenu_restant_a_payer_mean': -2800.0, 'impot_revenu_restant_a_payer_min': -24000.0, 'impot_revenu_restant_a_payer_sum': -9210000000.0, 'impot_revenu_restant_a_payer_count': 3240000.0, 'impot_revenu_restant_a_payer_sum_abs': 9760000000.0, 'rfr_par_part_max': 29000.0, 'rfr_par_part_mean': 26000.0, 'rfr_par_part_min': 23000.0, 'rfr_par_part_sum': 86050000000.0, 'rfr_par_part_count': 3240000.0, 'rfr_par_part_sum_abs': 86050000000.0, 'count': 3240000.0, 'quantile_num': 8.0, 'fraction': 0.0}, {'impot_revenu_restant_a_payer_max': 12000.0, 'impot_revenu_restant_a_payer_mean': -5700.0, 'impot_revenu_restant_a_payer_min': -43000.0, 'impot_revenu_restant_a_payer_sum': -18470000000.0, 'impot_revenu_restant_a_payer_count': 3240000.0, 'impot_revenu_restant_a_payer_sum_abs': 18860000000.0, 'rfr_par_part_max': 40000.0, 'rfr_par_part_mean': 34000.0, 'rfr_par_part_min': 29000.0, 'rfr_par_part_sum': 111400000000.0, 'rfr_par_part_count': 3240000.0, 'rfr_par_part_sum_abs': 111400000000.0, 'count': 3240000.0, 'quantile_num': 9.0, 'fraction': 0.0}, {'impot_revenu_restant_a_payer_max': 150000.0, 'impot_revenu_restant_a_payer_mean': -18000.0, 'impot_revenu_restant_a_payer_min': -1310000.0, 'impot_revenu_restant_a_payer_sum': -61530000000.0, 'impot_revenu_restant_a_payer_count': 3240000.0, 'impot_revenu_restant_a_payer_sum_abs': 62830000000.0, 'rfr_par_part_max': 3680000.0, 'rfr_par_part_mean': 70000.0, 'rfr_par_part_min': 40000.0, 'rfr_par_part_sum': 228900000000.0, 'rfr_par_part_count': 3240000.0, 'rfr_par_part_sum_abs': 228900000000.0, 'count': 3240000.0, 'quantile_num': 10.0, 'fraction': 1.0, 'rfr_max': 1000000000000000.0}], compare_before_after={'amendement_plf': CompareBeforeAfter(total=32417039, non_zero_before=19944667, non_zero_after=19944667, above_after=3947847, lower_after=15996820, neutral=12472371, tolerance_factor_used=0.05, weight_factor=1.0), 'amendement_base': CompareBeforeAfter(total=32417039, non_zero_before=20655079, non_zero_after=19944667, above_after=17565983, lower_after=0, neutral=14851056, tolerance_factor_used=0.05, weight_factor=1.0)})}, errors=[])
{'amendement_plf': CompareBeforeAfter(total=32417039, non_zero_before=19944667, non_zero_after=19944667, above_after=3947847, lower_after=15996820, neutral=12472371, tolerance_factor_used=0.05, weight_factor=1.0),
'amendement_base': CompareBeforeAfter(total=32417039, non_zero_before=20655079, non_zero_after=19944667, above_after=17565983, lower_after=0, neutral=14851056, tolerance_factor_used=0.05, weight_factor=1.0)}
"base"].state_budget
result.result["amendement"].state_budget
result.result["plf"].quantiles[5] result.result[
{'rfr_par_part': 706279997369.7501,
'impot_revenu_restant_a_payer': -104809340200.57452}
{'rfr_par_part': 705043993433.5272,
'impot_revenu_restant_a_payer': -94099999988.76035}
{'impot_revenu_restant_a_payer_max': 8800.0,
'impot_revenu_restant_a_payer_mean': -590.0,
'impot_revenu_restant_a_payer_min': -8100.0,
'impot_revenu_restant_a_payer_sum': -1940000000.0,
'impot_revenu_restant_a_payer_count': 3240000.0,
'impot_revenu_restant_a_payer_sum_abs': 2720000000.0,
'rfr_par_part_max': 20000.0,
'rfr_par_part_mean': 18000.0,
'rfr_par_part_min': 16000.0,
'rfr_par_part_sum': 60220000000.0,
'rfr_par_part_count': 3240000.0,
'rfr_par_part_sum_abs': 60220000000.0,
'count': 3240000.0,
'quantile_num': 6.0,
'fraction': 0.0}
"base"].compare_before_after
result.result["plf"].compare_before_after
result.result["amendement"].compare_before_after
result.result[
tc.assertGreater("plf"].compare_before_after["plf"].above_after,
result.result["amendement"].compare_before_after["amendement_plf"].above_after,
result.result[ )
{'base': CompareBeforeAfter(total=32417039, non_zero_before=20655079, non_zero_after=20655079, above_after=0, lower_after=0, neutral=32417039, tolerance_factor_used=0.05, weight_factor=1.0)}
{'plf': CompareBeforeAfter(total=32417039, non_zero_before=20655079, non_zero_after=19944667, above_after=17488305, lower_after=2948051, neutral=11980682, tolerance_factor_used=0.05, weight_factor=1.0)}
{'amendement_plf': CompareBeforeAfter(total=32417039, non_zero_before=19944667, non_zero_after=19944667, above_after=3947847, lower_after=15996820, neutral=12472371, tolerance_factor_used=0.05, weight_factor=1.0),
'amendement_base': CompareBeforeAfter(total=32417039, non_zero_before=20655079, non_zero_after=19944667, above_after=17565983, lower_after=0, neutral=14851056, tolerance_factor_used=0.05, weight_factor=1.0)}
Debug
Tests fix variable name
# Tests fix variable name
tc.assertEqual("csg_imposable_salaire"),
fix_variable_name_string("csg_imposable_salaire_foyer_fiscal",
)
tc.assertEqual("csg_imposable_salaire_foyer_fiscal", remove_suffix=True),
fix_variable_name_string("csg_imposable_salaire",
)
tc.assertEqual("csg_imposable_salaire"]),
fix_variable_name_list(["csg_imposable_salaire_foyer_fiscal"],
[
)
tc.assertEqual(next(
iter(
fix_variable_name_dict("csg_imposable_salaire_foyer_fiscal": -15739672162.12939},
{=True,
remove_suffix
)
)
),"csg_imposable_salaire",
)
= ReformeSocioFiscale(
reform =2023,
base=["csg_imposable_salaire_foyer_fiscal"],
output_variables
)= fix_variable_name_input(reform)
reform_out "csg_imposable_salaire_foyer_fiscal"])
tc.assertEqual(reform_out.output_variables, [= AllSimulationResult(
all_simulation_result ={
result"base": OneSimulationResult(
={"csg_imposable_salaire": -15739672162.12939},
state_budget=None,
quantiles=None,
compare_before_after
)
},=[],
errors
)
tc.assertEqual(next(
iter(
=True)
fix_variable_name_result(all_simulation_result, remove_suffix"base"]
.result[
.state_budget
)
),"csg_imposable_salaire",
)
= [
quantile
{"csg_deductible_salaire_foyer_fiscal_max": 0.0,
"csg_deductible_salaire_foyer_fiscal_mean": -66.58313135453727,
"csg_imposable_salaire_foyer_fiscal_sum": -78481215.12131548,
"count": 333963,
"fraction": 0.1,
},
]=True) fix_variable_name_list(quantile, remove_suffix
[{'csg_deductible_salaire_max': 0.0,
'csg_deductible_salaire_mean': -66.58313135453727,
'csg_imposable_salaire_sum': -78481215.12131548,
'count': 333963,
'fraction': 0.1}]
L’écart de calcul vient probablement des arrondis en fonction des float16 ou float32.
Le TBS de OF-France-data contient déjà une variable decile_rfr
Cette variable a une formule qui va calculer pour chaque ménage dans quel décile il se trouve.
class decile_rfr(Variable):
= int
value_type = FoyerFiscal
entity = "Décile de rfr"
label = YEAR
definition_period
def formula(foyer, period):
= foyer('rfr', period)
rfr = np.arange(1, 11)
labels #weights = 1.0 * np.ones(shape = len(rfr))
= foyer("weight_foyer", period)
weights = mark_weighted_percentiles(
decile, _ # + np.random.uniform(size = len(salaire)) - 0.5,
rfr,
labels,
weights,= 2,
method = True,
return_quantiles
)return decile
Cf France-data décile de revenu des ménages ordinaires, voir mark_weighted_percentile
L’erreur AssertionError: Some variables used as input variables are not part of the tax benefit system: {'quifoy', 'idfam', 'wprm', 'weight_foyers', 'idfoy', 'weight_familles', 'idmen', 'weight_menages', 'weight_individus', 'quimen', 'idmen_original', 'noindiv', 'quifam'}
n’est pas normale car dans LeximpactErfsSurveyScenario on commence par appeler self._set_used_as_input_variables()
dont le but est justement de supprimer ces variables !
=> Elle a été réglé par la mise en commentaire de certaines lignes dans _set_used_as_input_variables
de LeximpactErfsSurveyScenario
mais cela posait d’autres problèmes par la suite, il fallait finalement utiliser le TBS de France-Data et pas celui d’OpenFisca.
### Comment aller plus vite
Utiliser dump_simulation (écrit sur le disque l’état de la simulation) et restore_simulation (relit depuis le dump)