title: Is it possible to split a sequence of pandas commands across multiple lines?
body: <p>I have a long string of pandas chained commands, for example:</p>
  
  <pre><code>df.groupby[['x','y']].apply(lambda x: (np.max(x['z'])-np.min(x['z']))).sort_values(ascending=False)
  </code></pre>
  
  <p>And I would like to be able to present it across multiple lines but still as a one liner (without saving results to a temporary object, or defining the lambda as a function)</p>
  
  <p>an example of how I would like it to look:</p>
  
  <pre><code>df.groupby[['x','y']]
  .apply(lambda x: (np.max(x['z'])-np.min(x['z'])))
  .sort_values(ascending=False)
  </code></pre>
  
  <p>Is it possible to do so? (I know '_' has this functionality in python, but it doesn't seem to work with chained commands)</p>