Skip to main content

export medpc data to excel file and generate user defined variables

Project description


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


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

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

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 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 to give a try.


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



Project details

Download files

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

Files for medpc2excel, version 3.0.3
Filename, size File type Python version Upload date Hashes
Filename, size medpc2excel-3.0.3-py3-none-any.whl (14.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size medpc2excel-3.0.3.tar.gz (14.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page