I have a dataset of mf4 and I want to convert it into CSV in python. I have read the data from mf4 and convert it into csv (as given below) but I am getting an error, as I am new to python, so unable to find an appropriate method to convert.
from asammdf import MDF
import pandas as pd
efficient = MDF('./Data.mf4')
df = efficient.to_csv()
df.append(efficient)
mdf.save('output.csv')
I am getting this error:
MdfException: "Data.mf4" is not a valid ASAM MDF file: magic header is b'timestam'
Kindly suggest. Thank you!
You already have mf4 file. Is this file converted from an mdf file? If it is as I thought, you should use the mdf file to convert it into a CSV file. Here it is anyway and hopefully you or someone else can come up with a better method.
I used lib mdfreader to do this. You can refer below link for more detail.
mdfreader
Thanks for your feedback. I got it your issue, you can try:
to install the development branch code and then
About your case (use anaconda). Please try:
Lib mdfreader. In you want to install it.