python 2.7 - Pandas Series - print columns and rows -
python 2.7 - Pandas Series - print columns and rows -
for not worried performant way @ info in series, lets series follows :
a 1 b 2 c 3 d 4 if using loop iterate this, illustration :
for row in seriesobj: print row the code above print values downwards right hand side, lets say, want @ left column (indexes) how might that?
all help appreciated, new pandas , having teething problems.
thanks.
try series.iteritems.
import pandas pd s = pd.series([1, 2, 3, 4], index=iter('abcd')) ind, val in s.iteritems(): print ind, val prints:
a 1 b 2 c 3 d 4 python-2.7 pandas scipy
Comments
Post a Comment