0 votes
340 views
by datalab (20.7k points) | 340 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

418 questions

435 answers

440 comments

637 users

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

Categories