File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -2299,12 +2299,16 @@ def combine_tournament_stats(
22992299 for filename in src .glob (f"**/{ STATS_FILE } " ):
23002300 # try:
23012301 if verbose :
2302- print (f"[{ added + 1 } ] Stats from { filename } " , end = "" , flush = True )
2302+ print (f"[{ added + 1 } ] Stats from { filename } " , end = "" , flush = True )
23032303 data = extract_basic_stats (filename )
23042304 if data is None :
23052305 if verbose :
23062306 print ("No data found" )
23072307 continue
2308+ if len (data ) == 0 :
2309+ if verbose :
2310+ print ("Zero records found" )
2311+ continue
23082312 if verbose :
23092313 print ("{len(data)} records" )
23102314 added += 1
@@ -2377,9 +2381,14 @@ def combine_tournament_results(
23772381 for filename in src .glob ("**/scores.csv" ):
23782382 try :
23792383 data = pd .read_csv (filename )
2380- scores . append ( data )
2384+
23812385 if verbose :
2382- print (f"[{ added + 1 } ] Read: { str (filename )} ({ len (data )} records)" )
2386+ print (f"[{ added + 1 } ] Read: { str (filename )} " , end = "" , flush = True )
2387+ if data is None or len (data ) == 0 :
2388+ print ("No data found" )
2389+ continue
2390+ scores .append (data )
2391+ print (f"{ len (data )} records" )
23832392 added += 1
23842393 if added >= max_sources :
23852394 break
You can’t perform that action at this time.
0 commit comments