Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Level V

Python Send() does not recognize datetime format (sent as string)

When sending datatables to pandas dataframes (Python), numeric values (datetimes) are sent as strings.


I would not expect this behavior, since now I have to deal with this manually (considering datetimes in Python and JMP are different).


Any workaround? I imagine the easiest would be to transform the JMP format to integer, send this information, and transform the date considering the logic behind JMP dates (sum of seconds since specific date).



dt = Open( "$SAMPLE_DATA/Functional Data/Weekly Weather");

t = dt << Subset(

Python Init();
Python Send( t ); 

Python Submit( "
import pandas as pd



Python Term();

// Output
// DATE    object
// dtype: object

// Types:

//float              float64
//int                  int64
//datetime    datetime64[ns]  << Expected
//string              object
//dtype: object


Article Labels