AbhijitClemson commited on
Commit
7085d58
·
verified ·
1 Parent(s): 1adc2e7

Upload page_files/Categorized_Search.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. page_files/Categorized_Search.py +6 -3
page_files/Categorized_Search.py CHANGED
@@ -442,8 +442,12 @@ meta = (
442
  .drop_duplicates(subset=["material_abbreviation"])
443
  .reset_index(drop=True)
444
  )
445
- meta[["Matrix", "Fiber"]] = meta["material_abbreviation"].apply(
446
- lambda value: pd.Series(extract_matrix_fiber(value))
 
 
 
 
447
  )
448
 
449
  all_sections = get_all_sections()
@@ -895,6 +899,5 @@ with right_col:
895
 
896
 
897
 
898
-
899
 
900
 
 
442
  .drop_duplicates(subset=["material_abbreviation"])
443
  .reset_index(drop=True)
444
  )
445
+ matrix_fiber = meta["material_abbreviation"].apply(extract_matrix_fiber)
446
+ meta["Matrix"] = matrix_fiber.apply(
447
+ lambda pair: pair[0] if isinstance(pair, tuple) and len(pair) >= 2 else None
448
+ )
449
+ meta["Fiber"] = matrix_fiber.apply(
450
+ lambda pair: pair[1] if isinstance(pair, tuple) and len(pair) >= 2 else None
451
  )
452
 
453
  all_sections = get_all_sections()
 
899
 
900
 
901
 
 
902
 
903