iterate over pandas series code example
Example 1: how to iterate through a pandas dataframe
# creating a list of dataframe columns
columns = list(df)
for i in columns:
# printing the third element of the column
print (df[i][2])
Example 2: pandas core series traverse
for item in series: # Here type(series) = pandas.core.series.Series
print (item)