title: In pandas, is inplace = True considered harmful, or not?
body: <p>This has been discussed before, but with conflicting answers:</p>
  <ul>
  <li><a href="https://stackoverflow.com/a/34326313/8425408">in-place is good!</a></li>
  <li><a href="https://stackoverflow.com/a/22533110/8425408">in-place is bad!</a></li>
  </ul>
  <p>What I'm wondering is:</p>
  <ul>
  <li>Why is <code>inplace = False</code> the default behavior?</li>
  <li>When is it good to change it? (well, I'm allowed to change it, so I guess there's a reason).</li>
  <li>Is this a safety issue? that is, can an operation fail/misbehave due to <code>inplace = True</code>?</li>
  <li>Can I know in advance if a certain <code>inplace = True</code> operation will &quot;really&quot; be carried out in-place?</li>
  </ul>
  <hr />
  <h2>My take so far:</h2>
  <ul>
  <li>Many Pandas operations have an <code>inplace</code> parameter, always defaulting to <code>False</code>, meaning the original DataFrame is untouched, and the operation returns a new DF.</li>
  <li>When setting <code>inplace = True</code>, the operation <strong>might</strong> work on the original DF, but it might still work on a copy behind the scenes, and just reassign the reference when done.</li>
  </ul>
  <h3>pros of <code>inplace = True</code>:</h3>
  <ul>
  <li>Can be both faster and less memory hogging (the first link shows <code>reset_index()</code> runs twice as fast and uses half the peak memory!).</li>
  </ul>
  <h3>pros of <code>inplace = False </code>:</h3>
  <ul>
  <li>Allows chained/functional syntax: <code>df.dropna().rename().sum()...</code> which is nice, and offers a chance for lazy evaluation or a more efficient re-ordering (though I don't think Pandas is doing this).</li>
  <li>When using <code>inplace = True</code> on an object which is potentially a slice/view of an underlying DF, Pandas has to do a <code>SettingWithCopy</code> check, which is expensive. <code>inplace = False</code> avoids this.</li>
  <li>Consistent &amp; predictable behavior behind the scenes.</li>
  </ul>
  <p>So, putting the copy-vs-view issue aside, it seems more performant to always use <code>inplace = True</code>, unless specifically writing a chained statement. But that's not the default Pandas opt for, so what am I missing?</p>