Is it a correct way of doing loops in python?

It seems like you haven't read the documentation for pandas here. In there you will see that there are builtin methods for dataframes

df = pd.read_excel("file.xlsx", sheet_name = "Sheet1")    

for i, row in df.iterrows():
    driver.get(row.url)

Or you can to it even simpler!

df.apply(lambda row: driver.get(row.url), axis=1)

This applies the lambda-function to each row in the entiry dataframe.

Everything you will need to know to get startet with python can be found in here https://wiki.python.org/moin/BeginnersGuide