1#We create a function to shift up the data of each column up until the first actual number
2def shift_up(data):
3 i=0
4 while(i<len(data.columns)):
5 while(pd.isnull(data.iloc[0,i])==True):
6 data.iloc[:,i]=data.iloc[:,i].shift(-1)
7 i+=1
8 return data