For the latest information on the import jmp object's API see the Scripting Index 'Python' category in JMP. Documentation and sample code provide the latest updates. There are significant updates to the jmp module in 19.
Given your function, I would say it's Pandas that is throwing the ValueError:. Pandas has changed between its Python 3.11 version used in 18 and the Python 3.13 version utilized in JMP 19.
See the Scripting index example on jmp.DataTable.from_dataframe(). There are multiple examples there, both to and from JMP data tables and other dataframe compatible Python objects: Pandas; Polars; Ibis; ...
Specifically, 'Pandas to JMP' and 'JMP to Pandas' examples.
JMP to Pandas sample:
import jmp
import jmputils
try:
if not jmputils.is_installed('pandas'):
jmputils.jpip('install', 'pandas', echo=False)
except Exception as e:
print(f'Install failed with exception: {e}')
import pandas as pd
dt = jmp.open(jmp.SAMPLE_DATA + "Big Class.jmp")
pandas_df = (pd.api.interchange.from_dataframe(dt))
print(pandas_df)