Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/290.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python ';熊猫._libs.tslibs.Timestamp.Timestamp';成形文件_Python_Pandas_Timestamp_Gis - Fatal编程技术网

Python ';熊猫._libs.tslibs.Timestamp.Timestamp';成形文件

Python ';熊猫._libs.tslibs.Timestamp.Timestamp';成形文件,python,pandas,timestamp,gis,Python,Pandas,Timestamp,Gis,我有预测图,大多数使用时间戳数据,我绘制结果,我想将其保存为ESRI shapefile,但我不能,因为pandas的错误,你可能想查看最后一个单元格的代码文件 下面是代码示例 #test_df['probability'] = np.minimum(pred,0.300) fig,ax = plt.subplots() fig.set_size_inches((15,15)) test_df.plot(ax=ax,column='probability',cmap=cmap) plt.

我有预测图,大多数使用时间戳数据,我绘制结果,我想将其保存为ESRI shapefile,但我不能,因为pandas的错误,你可能想查看最后一个单元格的代码文件

下面是代码示例

#test_df['probability'] = np.minimum(pred,0.300)

fig,ax = plt.subplots()

fig.set_size_inches((15,15))

test_df.plot(ax=ax,column='probability',cmap=cmap)

plt.gca().set_facecolor('k')

plt.imshow(np.array([[test_df.probability.min(),test_df.probability.max()]]),origin='lower',cmap=cmap)

test_collisions.plot.scatter(x='Longitude',y='Latitude',

                         ax=ax,
                         s=500,
                         color='w',
                         zorder=9e99,
                         marker='*',
                         edgecolors='r')
divider = make_axes_locatable(ax)

cax = divider.append_axes("right", size="5%", pad=0.05)

ax.set_xbound(lower=x0,upper=x1)

ax.set_ybound(lower=y0,upper=y1)
plt.colorbar(cax=cax)

test_df.to_file('MyGeometriesSRSH-sout.shp', driver='ESRI Shapefile')
我把这个拿回来了

ValueError: Invalid field type <class 'pandas._libs.tslibs.timestamps.Timestamp'>
ValueError:字段类型无效
有什么建议吗