0 votes
389 views
by datalab (21.6k points) | 389 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
by robnik (1.0k points)
edited by 5

449 questions

463 answers

473 comments

658 users

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

Categories