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..ebeb239 100644 --- a/docs/index.md +++ b/docs/index.md @@ -29,17 +29,6 @@ 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](./writing.md). @@ -50,4 +39,17 @@ pip: ```shell pip install mdocfile -``` \ No newline at end of file +``` + +# 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() +```