Search code examples
python-3.xpandaslabview

LabVIEW TDMS file read with python pandas


How can I read a standard labVIEW generated TDMS file using python?


Solution

  • This worked for me:

    import pandas as pd
    from nptdms import TdmsFile
    
    tdms_file = TdmsFile("path/to/tdms_file.tdms")
    
    df = tdms_file['group'].as_dataframe()
    
    print(df.head())
    print(df.keys())
    print(df.shape)
    

    The npTDMS version 1.1.0 at least didn't have any object method for TdmsFile objects that was used in the previous examples here.