title: Is there a pandas function to display the first/last n columns, as in .head() & .tail()?
body: <p>I love using the <code>.head()</code> and <code>.tail()</code> functions in pandas to circumstantially display a certain amount of rows (sometimes I want less, sometimes I want more!).  But is there a way to do this with the columns of a DataFrame?</p>
  
  <p>Yes, I know that I can change the display options, as in:
  <code>pd.set_option('display.max_columns', 20)</code></p>
  
  <p>But that is too clunky to keep having to change on-the-fly, and anyway, it would only replace the <code>.head()</code> functionality, but not the <code>.tail()</code> functionality.</p>
  
  <p>I also know that this could be done using an accessor:
  <code>yourDF.iloc[:,:20]</code> to emulate .head(20) and <code>yourDF.iloc[:,-20:]</code> to emulate .tail(20).</p>
  
  <p>It may look like a short amount of code, but honestly it's not as intuitive nor swift as when I use .head().</p>
  
  <p>Does such a command exist? I couldn't find one!</p>