From aa11c130925ed45369107b0a707c5e0aa0fe7e19 Mon Sep 17 00:00:00 2001 From: Daniel Ji Date: Wed, 14 Aug 2024 00:51:49 -0700 Subject: [PATCH] update docs --- README.md | 26 +++++++++++++------------- docs/index.md | 28 ++++++++++++++++------------ 2 files changed, 29 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 2ae2f77..58996fd 100644 --- a/README.md +++ b/README.md @@ -28,22 +28,9 @@ 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: @@ -51,3 +38,16 @@ 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() +``` diff --git a/docs/index.md b/docs/index.md index 140ec9a..fefda90 100644 --- a/docs/index.md +++ b/docs/index.md @@ -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 -``` \ No newline at end of file +mdoc_data = ... + +mdoc = Mdoc.from_string(mdoc_data).as_dataframe() +```