I have a timeindexed dataframe with two columns "USER_ID" and "Daily_BALANCE". The dataframe shows the daily balance of users for the month of April 2018 (so 30 observations for each user). I need to generate from that dataframe a 3D numpy array with shape(N (Nb of Users in the dataframe), 30 (daily date), 1 (Balance)) holding the corresponding values. Can anyone help me a code for doing this. for example if we have a 100 users in the dataframe I get an array with the shape(100,30,1) an equivelance of a 100 2D arrays with 30 rows and one column each.
Thanks