I have a panel data frame in which the number of children a woman has is asked. Now I would like to delete all women who DON´T have children, while maintaining women who f.e. didn´t have a child in 2016, but in 2018. Here´s part of the data frame for reference:
ID year child
1 2012 0
1 2014 0
1 2016 1
2 2012 0
2 2014 0
2 2016 0
3 2014 1
3 2016 1
4 2012 0
4 2016 1
4 2018 2
5 2018 0
5 2020 0
Can someone help me delete all women who are not mothers?