Wrong location for the counter in loop for

Solution for Wrong location for the counter in loop for
is Given Below:

i have a problem with a loop inside my code.

df = pd.DataFrame(np.random.randn(6, 4), index=dates, columns=list("ABCD"))
ci = 0
for ci in range (0, len(df.columns):
 for di in range (0, len(df)):
  print('the value of {} is {}'.format(df.columns[ci], df.iloc[0, ci]))
 ci =+ 1
di =+ 1

When i wrote, i expected that the code print to me the phrase, loopng for the len(df) and when reaches the final of every column, pass to the next one.

I think that my mistake is in the position of the counter, but a tried many ways and failed

Here is one way to iterate over elements:

for col in df.columns:
    for row, value in df[col].iteritems():
        print('the value of {}/{} is {}'.format(col, row, value))

NB. unless you have a very good reason, iterating over elements of a DataFrame is generally not a good practice