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 3.10.0. It now allows to read both "*.txt" and non-extension files. Fix the bug that read unexisting array from data file. Remove mplcursor. The installation is no longer depended on mplcursor.

pip install medpc2excel

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

pip install medpc2excel --upgrade

Version updating note

Add data explorer to visualize timestampe data

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.medpc_read import medpc_read

f = <file path>

ts_df, log = medpc_read(f, override = True, 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

Pandas
Numpy
dill
mplcursors
openpyxl

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-3.10.0.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

medpc2excel-3.10.0-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: medpc2excel-3.10.0.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for medpc2excel-3.10.0.tar.gz
Algorithm Hash digest
SHA256 1961ef460d8a7c76c9f36b669b435d0e6d865f5a25254bfbb42cda80b712344f
MD5 46b4278714a4128c4cafcb4f49a309fe
BLAKE2b-256 f41192ead4b0f2e73519d26095e2f8da45fac0b0581e313aebd335d56e286611

See more details on using hashes here.

File details

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

File metadata

  • Download URL: medpc2excel-3.10.0-py3-none-any.whl
  • Upload date:
  • Size: 14.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for medpc2excel-3.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 78419475619ede2c8dc127eebce86c74bd392d50d6ea2f05b6147c7b4cb2e47d
MD5 8704d99beaaf5fb77b0341d5f7cc2d9e
BLAKE2b-256 142f74994ed7e2ed5b8b052313dd1e4a066cd60e14a29a4d66b967127ce9fcfe

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