title: Argument of type "Series[Dtype]" cannot be assigned to parameter of type "DataFrame"
body: <p>I have defined the following helper methods</p>
  <pre><code>def load_excel(file_path: str, sheet_name: str = ''):
      if sheet_name == '':
          df = pd.read_excel(file_path).fillna('').apply(lambda x: x.astype(str).str.lower())
      else:
          df = pd.read_excel(file_path, sheet_name).fillna('').apply(lambda x: x.astype(str).str.lower())
          
      return df
  
  def build_score_dict(keywords_df: pd.DataFrame, tokens: list):
      &quot;&quot;&quot;
      Returns a tuple of two dictionories. i.e. tuple[dict, dict]
      &quot;&quot;&quot;
      matched_keywords_by_cat_dict={}
      score_dict={}
  
      cnt_cols = keywords_df.shape[1]
      
      for col_idx in range(0, cnt_cols):
          keyword_list=list(keywords_df.iloc[:,col_idx])
          matched_keywords=[]
          parent_cat=0
          for j in range(0,len(tokens)):
              token = tokens[j]
              if token in keyword_list:
                  parent_cat= parent_cat + 1
                  matched_keywords.append(token)
                  parent_cat_name = keywords_df.columns[col_idx]
                  matched_keywords_by_cat_dict[parent_cat_name]=matched_keywords
                  score_dict[parent_cat_name]=parent_cat
      
      return matched_keywords_by_cat_dict, score_dict
  </code></pre>
  <p>My call to <code>build_score_dict</code>, as shown below</p>
  <pre><code>third_level_closing=load_excel(input_dir+'third_level_keywords.xlsx',sheet_name='closing')     
  _, level3_score_dict = build_score_dict(third_level_closing, tokens)
  </code></pre>
  <p>is giving me the following warning/error by Pylance in VSCode. What is happening here and how to fix it?</p>
  <pre><code>Argument of type &quot;Series[Dtype]&quot; cannot be assigned to parameter &quot;keywords_df&quot; of type &quot;DataFrame&quot; in function &quot;build_score_dict&quot;
    &quot;Series[Dtype]&quot; is incompatible with &quot;DataFrame&quot;Pylance (reportGeneralTypeIssues)
  </code></pre>