python - Series Index Pandas -


i have simple question. have series

[in]: item_series [out]: item_nbr        9           27396        28           4893        40            254        47           2409 

now have loop

for j in item_series:     print j 

right prints: 27396, 4893, 254, 2409. how can print item number? in example: 9, 28, 40, 47.

you can access index of pandas series using item_series.index

so example

for j in item_series.index:     print j 

Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

datatable - Matlab struct computations -