Hi,
I am trying to load and decode an MF4 file using the python API. In the MATLAB API, the index of the CAN channel is passed to the read method:
can_idx = 8;
rawTimeTable = read(m,can_idx,m.ChannelNames{can_idx});
I could not find out how to do the same thing when using the python API. Currently my code looks like this:
db = can_decoder.load_dbc(pathToDBC)
df_decoder = can_decoder.DataFrameDecoder(db)
with open(pathToMF4, "rb") as handle:
mdf_file = mdf_iter.MdfFile(handle)
df_raw = mdf_file.get_data_frame()
df = df_decoder.decode_frame(df_raw)
This does decode the data, but the dataframe is not ordered in groups like when using MATLAB. Is it possible to do this with the python API?
Hi,
I am trying to load and decode an MF4 file using the python API. In the MATLAB API, the index of the CAN channel is passed to the
readmethod:I could not find out how to do the same thing when using the python API. Currently my code looks like this:
This does decode the data, but the dataframe is not ordered in groups like when using MATLAB. Is it possible to do this with the python API?