Question Shashvati Dash · Jul 1, 2025

The below code is not working. its unable retrieve Record count and merge files

Class Util

{

 

ClassMethod zPyRecordCount(inputfile) As %Integer [ Language = python ]

{

    import pandas as pd

    import iris

    import io

 

    try:

        df = pd.read_csv(inputfile, sep='|')

        recordcount=len(df.index)

        sys.stdout.write(len(df.index))

        return recordcount

 

    except Exception as e:

        return 0

}

 

ClassMethod zPymergefiles(file1, file2, outputfilename) As %Boolean [ Language = python ]

{

 

    import pandas as pd

    import iris

    import io

 

    try:

        dataframe1=pd.

1
0 75
Question Shashvati Dash · Mar 3, 2025

I have pandas installed inside my C:/InterSystems/IRISHealth/mgr/python

 

Set pandas=##class(%SYS.Python).Import("pandas")                        
SET pandas=##CLASS(%SYS.Python).Import("pandas")
^
<THROW> *%Exception.PythonException <THROW> 230 ^^0^SET pandas=##CLASS(%SYS.Python).

1
0 474