# This is the format that I am trying to replicate in my code: <a href=" website "> title </a><br />
# An example:
# <a href="http://localhost:10080">SAS Studio</a><br />
# Importing important libraries
import pandas as pd
# Transferring my data from csv file into pandas dataframe
weblinks = pd.read_csv(r"C:\Users\BB\Documents\datascience\projects\websitelinking\weblinks.csv")
# This is to see the contents of the dataframe
weblinks.head()
# Making sure I get the code right
print('<a href=\"' + '\">' + '</a><br/>')
# Printing the whole dataframe
print(weblinks)
# Selecting for the first item
weblinks.iloc[0]
# Selecting for the second item
weblinks.iloc[1]
# Selecting for the third item
weblinks.iloc[2]
# Learning the difference between loc and iloc
weblinks.loc[0]
# Selecting just for the websites
weblinks['website']
# Selecting just for the titles
weblinks['title']
# Making sure the string is long enough so it will print the entire title or website
pd.set_option('max_colwidth', 400000)
# My desired end product
print('<a href=\"' + weblinks['website'] + '\">' + weblinks['title'] + '</a><br/>')