Make an API request
Get the data you want, when you want it.
API requests are made seamless in Quadratic by allowing you to use Python and then display the result of the request directly to the sheet.
Query API - GET request
Let's break our GET request down into a few different pieces.
Import the basic requests library you're familiar with, query the API, and get the data into a Pandas DataFrame.
Query API - POST request
Going from CSV to DataFrame
Bringing your CSV to Quadratic is as simple as a drag and drop. Once your CSV is in the spreadsheet, reference the range of cells in Python to get your data into a DatarFrame.
You use the argument first_row_header=True
to avoid the first row of your DataFrame being what is intended to be our header. Note that the output, in this case, is printed to the console since you already have your initial CSV in the sheet. After some manipulation of the data, perhaps you would want to display your new DataFrame. In that case, leave df
as the last line of code.
In this case, the spreadsheet reflects cells((0, 0),(0, 160))
since we want the full span of data in both columns 0 and 1 spanning from rows 0 to 160.
Last updated