Skip to content
Snippets Groups Projects
Verified Commit 500b2e88 authored by Alexander Dunkel's avatar Alexander Dunkel
Browse files

fix: limit number of samples to length of images available, if less than 50

parent 1fdab7bb
No related branches found
No related tags found
No related merge requests found
......@@ -958,7 +958,7 @@ from datetime import datetime
count = 0
df_images["userid"] = 0 # set default value
for pageid, row in df_images.sample(n=50).iterrows():
for pageid, row in df_images.sample(n=min(50, len(df_images))).iterrows():
params["pageids"] = pageid
try:
response = requests.get(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment