original_docstring: Merges glass descriptions with CH sectors via glass-ch matches
      Args:
          glass_descr (df): glass company descriptions
          glass_ch (df): glass companies house lookup
          ch_sector (df): companies house sectors
          threshold (int): match score threshold
      
docstring: Merges glass descriptions with CH sectors via glass-ch matches
docstring_tokens: Merges glass descriptions with CH sectors via glass - ch matches
code: def make_glass_ch_sectors(glass_descr, glass_ch, ch_sectors, threshold=60):
      """Merges glass descriptions with CH sectors via glass-ch matches
      Args:
          glass_descr (df): glass company descriptions
          glass_ch (df): glass companies house lookup
          ch_sector (df): companies house sectors
          threshold (int): match score threshold
      """
  
      _DIV_CODE_DESCRIPTION = extract_sic_code_description(
          load_sic_taxonomy(), "Division"
      )
  
      gl_ch_sector = (
          glass_descr.query("date == '2020-06-01'")
          .merge(glass_ch, left_on="org_id", right_on="org_id")
          .query(f"score > {threshold}")
          .merge(ch_sectors, left_on="company_number", right_on="company_number")
          .assign(division=lambda x: [c[:2] for c in x["SIC4_code"]])
          .assign(division_name=lambda x: x["division"].map(_DIV_CODE_DESCRIPTION))
          .pipe(preview)
      )
      return gl_ch_sector
code_tokens: def make_glass_ch_sectors ( glass_descr , glass_ch , ch_sectors , threshold = 60 ) : _DIV_CODE_DESCRIPTION = extract_sic_code_description ( load_sic_taxonomy ( ) , "Division" ) gl_ch_sector = ( glass_descr . query ( "date == '2020-06-01'" ) . merge ( glass_ch , left_on = "org_id" , right_on = "org_id" ) . query ( f"score > {threshold}" ) . merge ( ch_sectors , left_on = "company_number" , right_on = "company_number" ) . assign ( division = lambda x : [ c [ : 2 ] for c in x [ "SIC4_code" ] ] ) . assign ( division_name = lambda x : x [ "division" ] . map ( _DIV_CODE_DESCRIPTION ) ) . pipe ( preview ) ) return gl_ch_sector
short_docstring: Merges glass descriptions with CH sectors via glass-ch matches
short_docstring_tokens: Merges glass descriptions with CH sectors via glass - ch matches
comment: """Merges glass descriptions with CH sectors via glass-ch matches
      Args:
          glass_descr (df): glass company descriptions
          glass_ch (df): glass companies house lookup
          ch_sector (df): companies house sectors
          threshold (int): match score threshold
      """