Creating a Api links by url & list from a saved df
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2023
08:11 AM
- last edited on
03-21-2025
06:29 AM
by
Advika
I have 106,000 + api's I need to call, so instead of calling them one by one I would like to create a loop as I have the list of location Id's which I've called from there api locations list and these will sit at the end of the url to get more info on each location as the location list is limited.
e.g I want it to bring back all 106,000 api links from the 'IdColumn' from my loaded list
www.apilink/24563 ....
Please see code below if anyone could help it would be so helpful.
from pyspark.sql.types import StructField, StructType, StringType, DataType, Row
Idlist = spark.read.load("loadedfile.paquet")
locid = Idlist.select('IdColumn')
LookUppy = str('https://apilink/locations/') + str(Idlist['IdColumn'])
print(LookUppy)
I get this as the output =