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.1.0
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 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
openpyxl
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
Built Distribution
File details
Details for the file medpc2excel-2.0.0.tar.gz
.
File metadata
- Download URL: medpc2excel-2.0.0.tar.gz
- Upload date:
- Size: 17.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9dbd265184c586b944f48e56e99dcc17c014e20b940f7c464f7213de54e31dd7 |
|
MD5 | fe4f8964b566a3a4d9e116397c923f94 |
|
BLAKE2b-256 | e5393dde03aba7e7c082036d0583c8e9be99087d871d3b3282337cf2805e5438 |
File details
Details for the file medpc2excel-2.0.0-py3-none-any.whl
.
File metadata
- Download URL: medpc2excel-2.0.0-py3-none-any.whl
- Upload date:
- Size: 17.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c1e559cb053da6f1ce59bf89a0e1ce55f534259a27f05430cbbfe7b2ce0f5fb |
|
MD5 | 095f331b8207d3d8a59ec83c37f27a57 |
|
BLAKE2b-256 | 987257eb8fcf18421a5ed73c45484ad592798e86c8698c53ab85da9df190a8d9 |