Skip to content Skip to sidebar Skip to footer

Pandas: Trouble Implementing Panel Ols

I'm having a little bit of a difficult time understanding how to implement the Panel OLS in pandas. I have received help on this topic and I thought I was understanding the situati

Solution 1:

I got it; following up on ptrj, and doing some simple exploring I found the solution and will post it in the question

df=df.pivot_table(index='date',columns='cid', fill_value=0,aggfunc=np.mean)

df=df.T.to_panel()

df=df.transpose(2,1,0)

df=df.to_frame()

Post a Comment for "Pandas: Trouble Implementing Panel Ols"