我相信將數據表發送到pandas數據框(Python)時發現了不一致的行為。
我希望如果列缺少值,這些值將作為NaN傳遞給熊貓數據幀。
但是,只有在發送了不止一列的情況下,這才是正確的,否則Python僅接收不丟失的值。
ClearLog();
dt = Open( "$SAMPLE_DATA/Bands Data.jmp");
Explore Missing Values( Y( :caliper, :viscosity ), Missing Value Report );
x1 = dt << Subset(
Allrows,
Columns(:caliper)
);
x2 = dt << Subset(
Allrows,
Columns(:caliper, :viscosity)
);
Python Init();
Python Send( x1 ); // send the opened data table represented by dt to Python
Python Send( x2 ); // send the opened data table represented by dt to Python
Python Submit( "
print('x1:', len(x1))
print('x2:', len(x2))
" );
Python Term();<BR /><BR />// Output:<BR />// x1: 512<BR />// x2: 539