0%

What formats are available for downloading: wt parameter

The wt parameter is a Solr parameter that defines the query response format. Two formats are available for downloading with the batch_solr_request function: JSON or CSV.

We recommend saving in JSON format (by default, no need to add the wt parameter), as in CSV format, finer structures such as lists and nested data will be lost. To save in CSV format:

df = batch_solr_request(
    core='statistical-result',
    params={
        'q':'marker_symbol:Prkdc',
        'wt': 'csv',
        'fl': 'marker_symbol,top_level_mp_term_name,effect_size,p_value'
    },
    download=True,
    batch_size=100,
    filename='output'
)

On the next page we will try an exercise using the batch_solr_request function.