PythonSend() saves temporary csv which are read with the default pd.read_csv('myfile.csv'), hence no parse_date.
To deal with this, one option which is not impacted by the date format:
ClearLog();
dt = Open( "$SAMPLE_DATA/Functional Data/Weekly Weather Data.jmp");
t = dt << Subset(
Allrows,
Columns(:DATE)
);
t:DATE << Format(best);
Python Init();
Python Send( t ); // send the opened data table represented by dt to Python
Python Submit( "
import pandas as pd
print(t.dtypes)
print(t.head())
t.iloc[:,0] = pd.to_datetime(t.iloc[:,0], unit='s', origin=pd.Timestamp('1904-01-01'))
print(t.dtypes)
print(t.head())
");
Python Term();
// Output
// DATE int64
// dtype: object
// DATE
// 0 3534451200
// 1 3535228800
// 2 3537648000
// 3 3538252800
// 4 3538857600
// DATE datetime64[ns]
// dtype: object
// DATE
//0 2016-01-01
//1 2016-01-10
//2 2016-02-07
//3 2016-02-14
//4 2016-02-21
If there is a better way, let me know.