danielhrisca / asammdf

Fast Python reader and editor for ASAM MDF / MF4 (Measurement Data Format) files
GNU Lesser General Public License v3.0
655 stars 226 forks source link

How to jump over the exceptions and generate dataframes as possible during using to_dataframe() method? #1079

Open shangrilaer opened 2 months ago

shangrilaer commented 2 months ago

Python version

('python=3.11.8 | packaged by Anaconda, Inc. | (main, Feb 26 2024, 21:34:05) ' '[MSC v.1916 64 bit (AMD64)]') 'os=Windows-10-10.0.22631-SP0' 'numpy=1.26.0' 'asammdf=8.0.0'

Code

MDF version

4.1

Code snippet

mdfobj.to_dataframe( raster = rastertime,

channels=required_channels,

                                          time_as_date=True,                                               
                                          use_display_names=True,                                             
                                          interpolate_outwards_with_nan=True,                                               
                                          ignore_value2text_conversions=True,
                                          keep_arrays=False,
                                          numeric_1D_only=False   
                                          )

Traceback

Exception: can only concatenate str (not "bool") to str Exception: array-shape mismatch in array 1 ("XXXX_Y")

Description

During I transfering a big mf4 file to pandas dataframe using mdfobj.to_dataframe() ,
There are excepitons because of the MDFfile containing some MAP values maybe.

I'm wondering if there is a way to jump over these exceptions to extract channels possible but not quitting the convention. :