title: I got Index(...) must be called with a collection of some kind error in python pandas. How to fix that?
body: <p><strong>This is the function I wrote</strong></p>
  <pre><code>def fix_nan_values(df):
      df.drop('Cabin',axis='columns',inplace=True)
      df.Age.fillna(df.Age.mean(),inplace=True)
      df.Fare.fillna(df.Fare.mean(),inplace=True)
      df.dropna(subset='Embarked',inplace=True)
      return df
  </code></pre>
  <p><strong>And called the function</strong></p>
  <pre><code>fix_nan_values(df)
  </code></pre>
  <p><strong>Then got this error. Why? It works well in vs code. but occur an error in kaggle editor</strong></p>
  <p>Error</p>
  <p><img src="https://i.stack.imgur.com/w14m9.png" alt="1" /></p>