title: Pandas Split Dataframe by Unique Column Value
body: <p>I have a Dataframe that is being output to a spreadsheet called 'All Data'. Let's say this data contains a business addresses (column for street, city, zip, state). However, I also want to create a worksheet for each unique state containing the exact same columns. </p>
  
  <p>My basic idea was to iterate over every row using <code>df.iterrows()</code> and divide the dataframe like that by appending it to a new dataframe but that seems extremely inefficient. Is there a better way to do this?</p>
  
  <p>I found <a href="https://stackoverflow.com/a/33742822/2893712">this answer</a> but that is just a boolean index.</p>