No project description provided
Project description
This is the official machine data format package.
It supports csv importing, exporting and format compliance checking. Machine data files can be parsed into a python object that provides typed views on the contained measurement and event timeseries.
Some examples:
validation.py
in files/input/extension_testing
from mdata.core import as_v2
from mdata.io import write_machine_data_v2, read_machine_data_zip, write_machine_data_zip
from mdata.io.util import HeaderFileFormats, mk_canon_filenames_v2
# md = read_machine_data_v2(mk_canon_filenames_v2(header_format=HeaderFileFormats.YAML))
md = read_machine_data_zip('md.zip', header_format=HeaderFileFormats.YAML)
write_machine_data_zip('md_test.zip', md, header_format=HeaderFileFormats.YAML)
write_machine_data_v2(mk_canon_filenames_v2('test/', header_format=HeaderFileFormats.YAML), md, header_format=HeaderFileFormats.YAML)
as_v2(md)
print(md.event_specs)
print(md.measurement_specs)
print(md.segment_specs)
print(md.segment_data_specs)
print()
print(md.observation_index)
print(md.segments.df)
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
mdata-0.2.0.tar.gz
(231.0 kB
view hashes)
Built Distribution
mdata-0.2.0-py3-none-any.whl
(78.9 kB
view hashes)