original_docstring: 
      Merge and compare two feature importance dataframes
  
      :param imp_df1: feature importance dataframe #1
      :param imp_df2: feature importance dataframe #2
      :param feature_name: column name of features
      :param top_n: show top_n features
      :param color_dict: color dictionary
      :return:
          The merged dataframe
      
docstring: Merge and compare two feature importance dataframes
docstring_tokens: Merge and compare two feature importance dataframes
code: def _merge_feat_imp(imp_df1, imp_df2, feature_name, top_n, color_dict):
      """
      Merge and compare two feature importance dataframes
  
      :param imp_df1: feature importance dataframe #1
      :param imp_df2: feature importance dataframe #2
      :param feature_name: column name of features
      :param top_n: show top_n features
      :param color_dict: color dictionary
      :return:
          The merged dataframe
      """
  
      imp_df1['pos'] = 'left'
      imp_df2['pos'] = 'right'
      if top_n:
          both_imp = imp_df1.head(top_n).merge(
              imp_df2.head(top_n), on=feature_name, how='outer')
      else:
          both_imp = imp_df1.merge(imp_df2, on=feature_name, how='outer')
  
      both_imp['bar_color'] = both_imp.apply(
          lambda x: _rank2color(x, color_dict), axis=1)
      both_imp['bar_mark'] = both_imp.apply(lambda x: _get_mark(x), axis=1)
  
      return both_imp
code_tokens: def _merge_feat_imp ( imp_df1 , imp_df2 , feature_name , top_n , color_dict ) : imp_df1 [ 'pos' ] = 'left' imp_df2 [ 'pos' ] = 'right' if top_n : both_imp = imp_df1 . head ( top_n ) . merge ( imp_df2 . head ( top_n ) , on = feature_name , how = 'outer' ) else : both_imp = imp_df1 . merge ( imp_df2 , on = feature_name , how = 'outer' ) both_imp [ 'bar_color' ] = both_imp . apply ( lambda x : _rank2color ( x , color_dict ) , axis = 1 ) both_imp [ 'bar_mark' ] = both_imp . apply ( lambda x : _get_mark ( x ) , axis = 1 ) return both_imp
short_docstring: Merge and compare two feature importance dataframes
short_docstring_tokens: Merge and compare two feature importance dataframes
comment: """
      Merge and compare two feature importance dataframes
  
      :param imp_df1: feature importance dataframe #1
      :param imp_df2: feature importance dataframe #2
      :param feature_name: column name of features
      :param top_n: show top_n features
      :param color_dict: color dictionary
      :return:
          The merged dataframe
      """