title: better way to get a workable pandas dataframe out of a influx query
body: <p>I have an InfluxDB where I query to in python.
  I want to have only the top 250 ASN's. And got it in the following way.</p>
  <pre><code>client = InfluxDBClient(
                  host=os.environ['INF_HOST'],
                  port=os.environ['INF_PORT'],
                  username=os.environ['INF_USERNAME'],
                  password=os.environ['INF_PASSWORD'],
                  database=os.environ['INF_DB'],
                  ssl=bool((os.getenv('INF_SSL', 'False') == 'True')),
                  verify_ssl=bool((os.getenv('INF_SSL_VERIFY', 'False') == 'True')),
                  timeout=900)
  
  influx_query = 'SELECT dstAS, TX FROM( SELECT SUM(&quot;ifHCOutOctets&quot;) * 8 / 60 AS &quot;TX&quot; FROM &quot;1h_cache&quot;.&quot;dstas&quot; GROUP BY &quot;dstAS&quot; ) WHERE TX &gt; 20000000;'
  
  result = client.query(influx_query)
  for item in result:
      item.sort(reverse=True, key=lambda item: item.get(&quot;TX&quot;))
      values = item[:250]
      break
  </code></pre>
  <p>This gives me the result I want, but it feels kind of hacky and unstable.
  Does anyone have a better way to do this?</p>