in utilities/thumbnail-creation/thumbnail from category.py [0:0]
def run(category, foldername):
df_filtered = df[df['Object Name'] == category]
print("There are {} objects in ".format(df_filtered.shape[0]) + category)
counter = -1
for index, row in df_filtered.iterrows():
counter += 1
objectID = row['Object ID']
url = row['PrimaryImageUrl']
if counter%50==0:
print("Working on object: " + str(counter) + " with id: " + str(objectID))
if isinstance(url, float) and math.isnan(url):
next
elif not isinstance(objectID, int):
print("Object id: {} not an integer".format(objectID))
next
else:
make_thumbnail(objectID, url, foldername)