I'm new to pandas & numpy. I'm running a simple program
labels = ['a','b','c','d','e']
s = Series(randn(5),index=labels)
print(s)
getting the following error
s = Series(randn(5),index=labels) File "C:\Python27\lib\site-packages\pandas\core\series.py", line 243, in
__init__
raise_cast_failure=True) File "C:\Python27\lib\site-packages\pandas\core\series.py", line 2950, in
_sanitize_array
raise Exception('Data must be 1-dimensional') Exception: Data must be 1-dimensional
Any idea what can be the issue? I'm trying this using eclipse, not using ipython notebook.

所有评论(0)