From eccb3c4b4e5b7a52cec612b07e1a0c1f8bf73cde Mon Sep 17 00:00:00 2001 From: Nicolas Renkamp Date: Tue, 7 Mar 2023 13:04:44 +0100 Subject: [PATCH 1/2] Update fsspec example in Readme --- README.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 344969d..c38dad9 100644 --- a/README.md +++ b/README.md @@ -46,13 +46,15 @@ high level entrypoints to Foundry DevTools: `pandas` or `dask`. * For example: - ```python - import fsspec - dataset_rid = 'ri.foundry.main.dataset.4c33cd4-6fe3-7a13-5aab-703c1b80c9f8' - with fsspec.open(f"foundry://{dataset_rid}/test.txt", "r") as f: - print(f.read()) - 'content of test.txt' - ``` + + ```python + import pandas as pd + # /Global/Foundry Training and Resources/Foundry Reference Project/Ontology Project: Aviation/airlines + dataset_rid = 'ri.foundry.main.dataset.5d78f3ae-a588-4fd8-9ba2-66827808c85f' + df = pd.read_parquet(f"foundry://{dataset_rid}") + df.shape + Out[2]: (17, 10) + ``` * A [transforms](https://www.palantir.com/docs/foundry/transforms-python/transforms-python-api/) implementation From b3dc5f4ed4175ba95c45844babc6b111d6bf76ba Mon Sep 17 00:00:00 2001 From: Nicolas Renkamp Date: Tue, 7 Mar 2023 13:07:12 +0100 Subject: [PATCH 2/2] inline dataset_rid --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index c38dad9..1febc91 100644 --- a/README.md +++ b/README.md @@ -50,8 +50,7 @@ high level entrypoints to Foundry DevTools: ```python import pandas as pd # /Global/Foundry Training and Resources/Foundry Reference Project/Ontology Project: Aviation/airlines - dataset_rid = 'ri.foundry.main.dataset.5d78f3ae-a588-4fd8-9ba2-66827808c85f' - df = pd.read_parquet(f"foundry://{dataset_rid}") + df = pd.read_parquet("foundry://ri.foundry.main.dataset.5d78f3ae-a588-4fd8-9ba2-66827808c85f") df.shape Out[2]: (17, 10) ```