-
-
Couldn't load subscription status.
- Fork 19.2k
Closed
Labels
Compatpandas objects compatability with Numpy or Python functionspandas objects compatability with Numpy or Python functions
Description
Under Ubuntu 16, I am getting the following:
>>> import pandas as pd >>> import numpy as np >>> a = np.array([[1, 2], [3, 4]]) >>> a = pd.DataFrame(a) >>> a 0 1 0 1 2 1 3 4 >>> np.transpose(a) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "....../anaconda2/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 551, in transpose return transpose(axes) TypeError: transpose() takes exactly 1 argument (2 given) >>> a.T 0 1 0 1 3 1 2 4 >>> np.transpose(a.as_matrix()) array([[1, 3], [2, 4]]) Metadata
Metadata
Assignees
Labels
Compatpandas objects compatability with Numpy or Python functionspandas objects compatability with Numpy or Python functions