CSV files

Upload CSV files as a data source

CalcTree provides support for using CSV files in your calculation works. There are two ways to use CSV files in your work:

Using CSV files through Python

You can upload any file type to a CalcTree page, and the uploaded files will be available to Python scripts.

For example, click on File Upload to select a CSV file from your local drive to upload to CalTree. Use the sample CSV file below. After uploading, the file appears on the right-hand panel, and is accessible to Python via ct.page_files['file_name']. See example below:

Use a Python code source, to then interact with the uploaded file. Here's an example of how you might load the Load_Pattern_Definitions.csv into a pandas dataframe.

import pandas as pd

def read_csv(csv):
    return pd.read_csv(ct.page_files[csv]).astype('object').fillna("")
    
load_patterns_df = read_csv("Load_Pattern_Definitions.csv")

CSV files as calculation sources

Coming soon!

CSV parameters are among next items on our roadmap. Please follow our product roadmap items and status here and let us know what you think!

Last updated