ohio three ohio four nevada five nevada namestate two three four five nameyear note that the returned series have the same index as the dataframeand their name attribute has been appropriately set rows can also be retrieved by position or name by couple of methodssuch as the ix indexing field (much more on this later)in [ ]frame ix['three'out[ ]year state ohio pop debt nan namethree columns can be modified by assignment for examplethe empty 'debtcolumn could be assigned scalar value or an array of valuesin [ ]frame ['debt' in [ ]frame out[ ]year state one ohio two ohio three ohio four nevada five nevada pop debt in [ ]frame ['debt'np arange( in [ ]frame out[ ]year state one ohio two ohio three ohio four nevada five nevada pop debt when assigning lists or arrays to columnthe value' length must match the length of the dataframe if you assign seriesit will be instead conformed exactly to the dataframe' indexinserting missing values in any holesin [ ]val series([- - - ]index=['two''four''five']in [ ]frame ['debt'val in [ ]frame out[ ]year state pop debt introduction to pandas data structures www it-ebooks info