Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-ji committed Aug 14, 2024
1 parent 935c450 commit aa11c13
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 25 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,26 @@ import mdocfile
df = mdocfile.read('my_mdoc_file.mdoc')
```

`Mdoc.from_string().as_dataframe()` will return the contents of string mdoc data as a pandas dataframe.
This is useful for mdoc data that is not stored in a file (e.g. from a database or a web request).

```python
from mdocfile.data_models import Mdoc

mdoc_data = ...

mdoc = Mdoc.from_string(mdoc_data).as_dataframe()
```

For writing valid mdoc files, please see
[writing mdoc files](https://teamtomo.org/mdocfile/writing/).



# Installation

pip:

```shell
pip install mdocfile
```

# Parsing from text

`Mdoc.from_string().as_dataframe()` will return the contents of string mdoc data as a pandas dataframe.
This is useful for mdoc data that is not stored in a file (e.g. from a database or a web request).

```python
from mdocfile.data_models import Mdoc

mdoc_data = ...

mdoc = Mdoc.from_string(mdoc_data).as_dataframe()
```
28 changes: 16 additions & 12 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,29 @@ import mdocfile
df = mdocfile.read('my_mdoc_file.mdoc')
```

`Mdoc.from_string().as_dataframe()` will return the contents of string mdoc data as a pandas dataframe.
This is useful for mdoc data that is not stored in a file (e.g. from a database or a web request).
For writing valid mdoc files, please see [writing mdoc files](./writing.md).

```python
from mdocfile.data_models import Mdoc
---

mdoc_data = ...
# Installation

mdoc = Mdoc.from_string(mdoc_data).as_dataframe()
pip:

```shell
pip install mdocfile
```

---

For writing valid mdoc files, please see [writing mdoc files](./writing.md).
# Parsing from text

# Installation
`Mdoc.from_string().as_dataframe()` will return the contents of string mdoc data as a pandas dataframe.
This is useful for mdoc data that is not stored in a file (e.g. from a database or a web request).

pip:
```python
from mdocfile.data_models import Mdoc

```shell
pip install mdocfile
```
mdoc_data = ...

mdoc = Mdoc.from_string(mdoc_data).as_dataframe()
```

0 comments on commit aa11c13

Please sign in to comment.