SerialEM mdoc files as pandas dataframes.
Project description
mdocfile
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
Release history Release notifications | RSS feed
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)