Shiloh Ayala
← Work

Data wrangling for an assessment of early postnatal interviews in France

Nov 2026 · emlyon, Data Analysis and Visualization with Python
PythonpandasData cleaningAI-assisted coding
Data
Santé publique France, Odissé open data portal, Licence Ouverte 2.0
Tools
AI-assisted Python, pandas, NumPy, Google Colab, Claude.

In November 2026, our team of four in the Data Analysis and Visualization with Python course at emlyon took on a question I proposed, whether France's early postnatal interview (entretien postnatal précoce, or EPNP) is reaching the new mothers who need it most.

Every new mother in France is offered this conversation with a midwife or doctor after the birth, partly to spot mothers who are struggling with their mental health. Yet, according to Santé publique France's open data, only 19.4% of eligible women had it in 2023 and 24.85% in 2024, roughly one in four. In the 2021 national perinatal survey, 16.8% of mothers showed symptoms of postpartum depression (95% confidence interval 15.9% to 17.8%). Our team framed this as a need versus reach question for Assurance Maladie, asking whether the interview is missing the regions where maternal mental health need is highest.

I led data preparation, which meant sourcing, cleaning, checking and documenting three Santé publique France datasets covering 2012 to 2024 at the regional, national and département level before handing clean files to our statistics lead. I worked with Claude as a coding assistant; my team and I utilized Claude to identify and visualize task precedence for the project, aligned with our chosen KPIs. I then made cleaning decisions, and had Claude pull suggested code scoped solely within our coursework. I double-checked each block's printed output before moving on, confirming that all three tables loaded at the same size as the published Odissé files (234 rows by 62 columns for the regions, 13 by 55 for France and 1,339 by 10 for the départements), that the corrected region names matched INSEE's official list, that region codes kept their leading zeros, that the rows behind every blank were the places and years I expected, and that each saved file reloaded with the same rows and columns as the table I had cleaned. For traceability, our work utilizes an ongoing AI use-log so any potential errors with AI at the source can be pinpointed with accuracy and efficiency.

I loaded all three datasets straight from the Odissé API with requests and pandas, so anyone running our notebook pulls the official source data. When the API returned short code names instead of the French column headers the team had agreed on, I found that the use_labels=true setting made them match the published files exactly. Before any cleaning, I set a naming rule for every column, with counts ending in _n, percentages in _rate and percentage point differences in _pp, and wrote a data dictionary so the whole team used the same names.

My first job was making the three tables consistent and trustworthy. I fixed four region names so the regional and département tables would join cleanly, stored region codes as text so that Guadeloupe's "01" wouldn't quietly become the number 1, added a column separating mainland and overseas regions, and removed six columns that were entirely empty. I renamed only the columns we would use and kept every other indicator, so no teammate would go looking for something they expected and find it gone. I then checked for duplicates and impossible values, meaning any rate outside 0 to 100, any negative count, or any depression rate sitting outside its own confidence interval, and found none in any of the three tables, with every check printing its result in the notebook so the numbers could be confirmed rather than taken on trust.

A bulk of the work was assessing what the data could and couldn't support. In my wrangling process, the decision that touched the most data was how to handle the blanks. Our two measures come from very different sources, the interview figures from national health insurance claims data (SNDS), which only exist for 2023 and 2024, and the depression figures from the national perinatal survey (ENP), which in our files only exist for 2021. Deleting rows would have thrown away most of the data and filling gaps would have invented it, so instead I flagged every blank and recorded its reason. This showed that 1,570 blanks were missing by design and only 7 values were genuinely missing, Mayotte's interview figures for both years and the 2021 depression figures for Guyane, Corsica and Mayotte. The claims data and the survey also count mothers differently, SNDS by where the mother lives and ENP by where she gave birth, which is a real limitation when the main comparison puts them side by side.

Notebook cell flagging missing data, with its output showing 1,570 blanks missing by design and 7 genuinely missing values
The missing-data check and its output

To finish, I built a 34-row data dictionary in code so its year ranges and missing-value counts are calculated from the tables themselves, giving each column's original French name, plain-language meaning, unit, source, years covered and number of missing values. I saved the clean files, reloaded each one to confirm it matched what was in memory, and wrote a cleaning log of eight decisions showing that no rows were lost at any step.

Our statistics lead's first pass, a Spearman rank correlation we chose before any calculation, pointed toward lower uptake where need was higher across the 15 regions with both measures, but with a p-value of 0.265 and a bootstrap confidence interval that crosses zero, the pattern could be due to chance. Final results, charts and recommendations are pending, and this page will be updated when the project is complete.

Built with Malak Abdelhai, Lorena Gómez Acosta and Caitlin Chesnais-Dixon.

Sources

  1. Santé publique France, Odissé, "perinatalite-post-partum-france" dataset, Licence Ouverte 2.0. odisse.santepubliquefrance.fr ↩