You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python and Matlab create two different instances of Pandas classes that are not interchangeable, at least I did not find how to do so.
Here is what works, but unfortunately this is not very helpful:
importmatlab.engineimportpandaseng=matlab.engine.start_matlab()
eng.addpath(r'Matlab/PythonInterface',nargout=1) # add path to the functionsdata= {'Date': ['1/1/2021', '1/2/2021', '1/3/2021', '1/4/2021'], 'Age': [16, 64, 4, 25]}
df=eng.py.pandas.DataFrame(data) # creates DataFrame within Matlabtest_table=eng.df2t(df)
eng.disp(test_table, nargout=0) # Will print out the table
Hi,
When I try to send a dataframe to the df2t function in Python, I get this error message: unsupported Python data type: pandas.core.frame.DataFrame
I'm not sure why this is happening even though I followed all of your steps. Thanks and I hope to hear back soon. @Lenskiy @AlDanial
The text was updated successfully, but these errors were encountered: