Answer by zabop for Pandas DataFrame - Fill NaNs of columns based on values...
# imports we need laterimport numpy as npimport pandas as pdThis is a not a particularly efficient method but it works. I'll leave out your last column, to make things more systematic.The df:df =...
View ArticlePandas DataFrame - Fill NaNs of columns based on values of other columns
I have a wide data frame with several years:df = pd.DataFrame(index=pd.Index([29925, 223725, 280165, 813285, 956765], name='ID'), columns=pd.Index([1991, 1992, 1993, 1994, 1995, 1996, '2010-2012'],...
View Article
More Pages to Explore .....