Skip to content

Commit

Permalink
Merge pull request #3 from emdgroup/nicornk/update-fsspec-example
Browse files Browse the repository at this point in the history
Update fsspec example in Readme
  • Loading branch information
jonas-w authored Mar 7, 2023
2 parents f9d2ea3 + b3dc5f4 commit b4bd7dc
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,14 @@ 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
df = pd.read_parquet("foundry://ri.foundry.main.dataset.5d78f3ae-a588-4fd8-9ba2-66827808c85f")
df.shape
Out[2]: (17, 10)
```

* A [transforms](https://www.palantir.com/docs/foundry/transforms-python/transforms-python-api/) implementation

Expand Down

0 comments on commit b4bd7dc

Please sign in to comment.