can i knw whats the error in the below code

By Divi_dixit98, 5 months ago
  • Bookmark
0

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/var/folders/p7/jnl0t3wx3zl134njfdq4jmvr0000gn/T/ipykernel_58863/2700131841.py in <module>
      3 from numpy.random import randn
      4 np.random.seed(101)
----> 5 df = pd.DataFrame(randn(5,4), index = 'A B C D E'.split(), column = 'W X Y Z'.split())

TypeError: __init__() got an unexpected keyword argument 'column'


Python
Numpy
Df
1 Answer
0
Maheshpardeshi

Please check the spelling of column it should be columns as per syntax.

Your Answer

Webinars

Live Masterclass on : "How Machine Get Trained in Machine Learning?"

Aug 14th (4:00 PM) 432 Registered
More webinars

Related Discussions

Running random forest algorithm with one variable

View More