I am trying to generate links using a for loop and trying to add them to my empty dataframe like the example below:
linkdf = pd.DataFrame(columns=['Link'])
for i in range(1,10):
l = 'https://google.com/assets/' + str(i)
linkdf = linkdf.append(l)
but I am getting errors like below:
TypeError: cannot concatenate object of type '<class 'str'>'; only Series and DataFrame objs are valid
is there a way to add this to the empty dataframe with header already provided.
want result like below:
Link
0. https://google.com/assets/1
1 https://google.com/assets/2
2. https://google.com/assets/3
Appreciate any help Thanks