0 votes
336 views
asked May 28, 2017 by datalab (19,200 points) | 336 views

1 Answer

+1 vote

We provide a simple converter that allows you to put the result of a query into one of several popular formats in the memory of your notebook. For instance, inside a notebook, you can do:

from dl import queryClient as qc, helpers
query = # write my complicated query string here
result = qc.query(token,query) # result is a CSV string by default
df = helpers.convert(result,outfmt='pandas') # df is now a Pandas dataframe in your notebook

Other currently supported conversions are:

'outfmt' arg   Returned output
------------------------------
      string   CSV formatted table as a string
       array   Numpy array
 structarray   Numpy structured / record array
      pandas   Pandas dataframe
       table   Astropy Table
     votable   Astropy VOtable
answered May 28, 2017 by robnik (1,040 points)

359 questions

372 answers

385 comments

2,427 users

Welcome to Data Lab Help Desk, where you can ask questions and receive answers from other members of the community.