title: python pandas dataframe, is it pass-by-value or pass-by-reference
body: <p>If I pass a dataframe to a function and modify it inside the function, is it pass-by-value or pass-by-reference?</p>
  
  <p>I run the following code</p>
  
  <pre><code>a = pd.DataFrame({'a':[1,2], 'b':[3,4]})
  def letgo(df):
      df = df.drop('b',axis=1)
  letgo(a)
  </code></pre>
  
  <p>the value of <code>a</code> does not change after the function call. Does it mean it is pass-by-value?</p>
  
  <p>I also tried the following</p>
  
  <pre><code>xx = np.array([[1,2], [3,4]])
  def letgo2(x):
      x[1,1] = 100
  def letgo3(x):
      x = np.array([[3,3],[3,3]])
  </code></pre>
  
  <p>It turns out <code>letgo2()</code> does change <code>xx</code> and <code>letgo3()</code> does not. Why is it like this?</p>