Skip to main content

SerialEM mdoc files as pandas dataframes.

Project description

mdocfile

License PyPI Python Version CI codecov

SerialEM mdoc files as pandas dataframes.

mdocfile is Python package for working with SerialEM mdoc files.


Quickstart

mdocfile.read() will return the contents of an mdoc file as a pandas dataframe.

import mdocfile

df = mdocfile.read('my_mdoc_file.mdoc')

For writing valid mdoc files, please see writing mdoc files.

Installation

pip:

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).

from mdocfile.data_models import Mdoc

mdoc_data = ...

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mdocfile-0.1.3.tar.gz (28.2 kB view hashes)

Uploaded Source

Built Distribution

mdocfile-0.1.3-py3-none-any.whl (6.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page