0

I am trying to build a panel from a 3 dimensional Nd array by using optional axis labels in python 3 on colab. and i get an error message of object takes no parameters on line 7 (minor_axis).

import pandas as pd
import numpy as np
P1 = pd.Panel(np.random.randn(2,5,4), 
              items=['Item1','Item2'], 
              major_axis=pd.date_range('10/05/2018', periods=5),
              minor_axis=['A','B','C','D'])
P1

Type Error: Object() takes no parameters

Can somebody please explain it to me what I am doing wrong here???

Lucky Ansari
  • 51
  • 1
  • 1
  • 9
  • Can you provide more stack trace? – Daniele Grattarola Jul 27 '20 at 09:52
  • 1
    In recent versions of Pandas, Panel has been removed. Does this answer your question? [What is the pandas.Panel deprecation warning actually recommending?](https://stackoverflow.com/questions/48482256/what-is-the-pandas-panel-deprecation-warning-actually-recommending) – funie200 Jul 27 '20 at 09:56

0 Answers0