I have a dataset with data from 2015 and 2016 for different buildings, their location information.
Like this:
As we can see, for the same OSEBuildingID most of their information are available and are the same, however, there are NaN in some columns. So we can use the value of the same BuildingId to fillin those values. I've tried:
df.groupby('OSEBuildingID')['LargestPropertyUseTypeGFA'].transform(lambda group: group.fillna(group.mode()))
But nothing has changed, could anyone help please?
Thank you very much