Every working parent has trouble leaving the work at the office at the end of the day and focusing on family life. But in Senegal, where my work trips took me away for weeks at a time, reintegrating to home life could be particularly jarring: After meeting with children forcibly recruited into fighting a war by Islamic extremists, I came home to my own children whining about not getting a lead role in a school play and gripes about their father using the wrong kind of Band-Aid to cover their skinned knee. I didn’t shy away from telling my kids about the stories I had reported, hoping they would see the juxtaposition on their own.

I was pushing ahead in my career, and my husband, as the parent who mostly stayed behind, got to know our kids better than he ever had. But my children became hardened to me being gone. They came up with a name for me, a result of correcting themselves when their first impulse was to call out for their dad: To them, I was Daddy Mommy.

One evening I walked in the door to our house, relieved to let down my guard after tracking illegal gold miners in rural Senegal who were keen to show me the finer points of mining with plastic explosives. I entered the living room, where the kids were sitting on the floor engrossed in a board game with my husband. They didn’t even look up.

It made me feel bad, but I also knew that just outside my door, women were up against a much more rigid set of gendered expectations.

Many of the societies I covered were so patriarchal that women weren’t allowed to own land. In many families, men made all the big decisions and women were expected to stay home and cook and clean. This was a message broadcast by the most powerful men in society. Muhammadu Buhari, the president of Nigeria, once publicly proclaimed that his wife “belongs to my kitchen.”

Yet women here, too, were finding new ways to thrive. In the most cosmopolitan of cities, Lagos, Nigeria, I met with young women bucking societal expectations that they marry and have children in their 20s. Instead, they were focusing on their careers. This was such an affront to expectations that Nigerian mainstream media mocked them by calling them “old cargo.”

I spent a day shadowing Toyin Sanni, then one of the few female bank chief executives on the entire continent, as she conducted meetings from her corner office in a skyscraper along the Wall Street of Lagos. She had married another banker at a competing institution — but like many successful career women, Ms. Sanni didn’t divulge her salary to her husband, a simple and effective way to avoid denting the male ego.