I have several data frames and for all of them, I want to carry out the same procedure. As an example, for one data frame (df1), the code looks the following:
def create_url():
df_id = (str(str((df1['id'].tolist()))[1:-1])).replace(" ", "")
ids1 = "ids=" + df_id1
url1 = "https://api.twitter.com/2/tweets?{}&{}".format(ids1, tweet_fields)
return url1
However, for all df which I have I want to loop this code in order to get one url per df (which are names then url1, url2, etc.). To get the whole list of names of df, I used the following code:
for j in dfs:
print(j)
Hope somebody can help!
Thank you a lot in advance!