Skip to main content

export medpc data to excel file and generate user defined variables

Project description

medpc2excel

medpc2excel is a Python package for convert single or multiple medpc data file into Excels. medpc2excel can also return a pandas DataFrame for further analysis

Installation

I recommend installing an Anaconda distribution of Python -- Choose Python 3.7.

Use the package manager pip to install medpc2excel. Current version is 1.4.1

pip install medpc2excel

To upgrade medpc2excel (package here), run the following in the environment:

pip install medpc2excel --upgrade

Configure *.MPC file

Please include a medpc protocol file (*.MPC) that you used for behavior task. The file name of this MPC file should be the same as in the medpc data file. The medpc2excel will open the medpc data file and automatically search the used *.MPC file in the same directory. In *.MPC file, please explicitly declare each array as below:

<... your MPC code...>

    DIM C =9999  \ Levertype                     
    DIM D =9999  \ PelHLON                       
    DIM E =9999  \ PelHLOFF   

<... your MPC code ...>

Running medpc2excel

The most quickest way to start is to open the GUi from a command line terminal in anaconda cmd prompt:

python -m medpc2excel

You also can import this module and use the function called medpc_read as following

from medpc2excel import medpc_read

f = <file path>

ts_df, log = medpc_read(f, replace = False) # return a timestamp dataframe and a log string

Please download the Example folder to your local disk and run the medpc2excel_example.py to give a try.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate

Dependencies

OS
Pandas
Numpy
re

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

medpc2excel-1.5.5.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

medpc2excel-1.5.5-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file medpc2excel-1.5.5.tar.gz.

File metadata

  • Download URL: medpc2excel-1.5.5.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.1.post20200323 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.7

File hashes

Hashes for medpc2excel-1.5.5.tar.gz
Algorithm Hash digest
SHA256 41f5d6e4fbf9f6a36173b69224dda641e5d1df9e60da2c3f0e0b7f6fba745aba
MD5 510c8acfe9261f8d2a80c4780fc6037c
BLAKE2b-256 b798131cb6c439dc23418f4b127ea95dfc72766b095d961191bf9a1c2e94af8b

See more details on using hashes here.

File details

Details for the file medpc2excel-1.5.5-py3-none-any.whl.

File metadata

  • Download URL: medpc2excel-1.5.5-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.1.post20200323 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.7

File hashes

Hashes for medpc2excel-1.5.5-py3-none-any.whl
Algorithm Hash digest
SHA256 62e065ed90068faa2e838936b6e9c1658963ca5a70e9b79d9e82317ed593ff40
MD5 df84e627c4b4c7e4168c0c453cf70f5b
BLAKE2b-256 cfdfe4a068938f42bbdb473efe91e2b302c41125b493ec439c11e0f6fb06146a

See more details on using hashes here.

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