↧
Answer by Henry Yik for Get the value of the precedent day in a pivot table
IIUC you can check for your conditions with pd.Series.where:pt = raw.pivot_table(index=['GROUP_ID', 'DATE'], columns=['NAME'], values=['VALUE'])s =...
View ArticleGet the value of the precedent day in a pivot table
I have a pivot table of approximately 2 millions lines coming from a dataframe with the same structure as below:raw = pd.DataFrame([[123456,datetime(2020,7,1),'A',10 ],...
View Article