Platform tools
This page is a collection of methods used to save and retrieve custom user data inside the SigTech platform.
The following command imports the Python module:
Saving DataFrames and series
Pandas DataFrames and series can be saved to a file in a user's designated AWS S3 bucket and accessed later using the same workspace.
The following code block demonstrates how to save a Pandas DataFrame into a .csv file and store it in the AWS S3 bucket:
Once saved, the following code loads the file.
Saving other file formats
Other file types can be saved to S3 using the save_file
function and retrieved using the open_file
function within Platform Tools.
Example: a NumPy series can be saved in bytes to a file-like object and parsed with the save_file
function:
The file can later be retrieved with the open_file
function, which works similarly to Python's built-in open
function:
Uploading in the workspace
Data can also be uploaded in the Custom Data pathway in your workspace.
To upload a file, click Custom Data in the workspace-and-collaboration menu:
The Custom Data screen is displayed. Follow the onscreen instructions to upload your file.
Once uploaded, the open_file
function can also be used to access this data. In the following example, the file name "dummy_data.csv"
is adopted.
Amend this file name to match the name of the file you have uploaded to run the code block:
Data Ingestion API
The functions get_dataset
and get_dataset_file
can be used to retrieve datasets and individual files previously uploaded using the data ingestion API.
Results are returned as a Pandas DataFrame. In the following example '<id>'
is used as a shorthand for explanatory purposes.
Learn more: Data Ingestion API
Last updated