Skip to content
Snippets Groups Projects
Commit bc30e0e9 authored by Sebastian Kerger's avatar Sebastian Kerger
Browse files

Upload New File

parent 436cf6d0
Branches
No related tags found
No related merge requests found
%% Cell type:code id:214f6c0e-b23f-41e9-946d-9151b77d591c tags:
``` python3
import pandas as pd
from mikeplus import DataTableAccess
from mikeplus.engines import Engine1D
from mikeio1d import Res1D
from mikeio1d.query import QueryDataStructure
from pathlib import Path
```
%% Cell type:markdown id:07c9bb35-946c-4f24-a70b-645452dfa1be tags:
# ST column names
%% Cell type:code id:573590c1-ba7c-45b0-984a-c0fe751a5d1d tags:
``` python3
# Construct the file path
result_file_path = r"path\example_ST.res1d"
res1d = Res1D(str(result_file_path)) # Create a Res1D instance with the file
df = res1d.read() # Read all data from the .res1d file
```
%% Cell type:code id:e022f845-8b2b-4666-a79e-b3a56b95dd75 tags:
``` python3
matching_columns = [col for col in df.columns if "reach|node|structure_name" in col]
print(matching_columns)
```
%% Cell type:markdown id:0373a6a7-42a1-498a-a4b9-f9bfa2ad16b6 tags:
# AD column names
%% Cell type:code id:594eb63b-940e-4300-bf07-f928ed9e2df0 tags:
``` python3
# Construct the file path
result_file_path_ad = r"path\exmaple_AD.res1d"
res1d_ad = Res1D(str(result_file_path_ad)) # Create a Res1D instance with the file
df_ad = res1d_ad.read() # Read all data from the .res1d file
```
%% Cell type:code id:ee6ed680-a425-4b2c-9a4c-9a8fea7a6dc9 tags:
``` python3
matching_columns_ad = [col for col in df_ad.columns if "reach|node|structure_name" in col]
print(matching_columns_ad)
```
%% Cell type:markdown id:d2cdf6b2-af96-42be-a389-96836c03bfb3 tags:
# Catchment column names
%% Cell type:code id:fcaba177-d464-4368-be7b-5cf293b271d5 tags:
``` python3
# Construct the file path
result_file_path_catch = r"path\example_Catchment_discharge_quality.res1d"
res1d_catch = Res1D(str(result_file_path_catch)) # Create a Res1D instance with the file
df_catch = res1d_catch.read() # Read all data from the .res1d file
```
%% Cell type:code id:4855dd6e-523c-4547-87d5-7806e88afbc9 tags:
``` python3
matching_columns_catch = [col for col in df_catch.columns if "Catchment_name" in col]
print(matching_columns_catch)
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment