title: API error encountered when trying to use matplotlib with gspread
body: <p>I'm trying to use matplotlib to plot graphs using data from a google sheet. I read the documentation and enabled Google Drive &amp; Google Sheets API but I get an error:</p>
  <blockquote>
  <p>APIError: {'code': 400, 'message': 'This operation is not supported for this document', 'status': 'FAILED_PRECONDITION'}</p>
  </blockquote>
  <p>On a side note, I'm quite new to data analytics, so given a table with a column that has only '0' or '1', how can I split the dataframe and plot those rows of data with '0' or '1'?</p>
  <pre><code>import gspread
  import pandas as pd
  from google.colab import auth
  from google.auth import default
  auth.authenticate_user()
  creds, _ = default()
  
  gc = gspread.authorize(creds)
  # sh = gc.open_by_url(&quot;&quot;)
  sh = gc.open_by_key(&quot;&quot;)
  worksheet = sh.worksheet(&quot;user06&quot;)
  rows = worksheet.get_all_values()
  pd.DataFrame.from_records(rows)
  </code></pre>