我是使用 python 的新手。
第 1 步:我有一个 CSV 文件,其中包含有关车辆驾驶信号的信息。
步骤 2:从文件中,我以 pandas 数据帧的形式提取了一些纬度和经度数据。
第 3 步:现在我将该数据框保存为 CSV 文件。
第 4 步:保存后,我将该文件提供给 Online GPS Visualizer,以便它生成一个开放街道地图。
[![在此处输入图像描述][1]][1]
我只想在 python 中绘制相同的地图,而不是向 Online GPS Visualizer 提供 Lat&Long csv 文件。那么我应该使用哪个库?底图库适合我的工作还是我应该选择其他选择?
在 python 中绘制地图后,我只想突出显示地图中的一些纬度和经度点。(如图所示)
我试图将 Pandas 列中的数据可视化为 3D 散点图。我面临的问题是将颜色条匹配调整到我的 z 轴的确切大小。
我的代码:
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
s = pd.read_csv('FahrerVP8.out_1.csv', index_col=0)
ax = plt.figure()
three_d = ax.gca(projection='3d')
three_d1 = three_d.scatter(s['Latitude'], s['Longitude'],s['Mean_ VehicleSpeed'], c =s['Mean_ VehicleSpeed'] )
three_d.set_xlabel('Latitude')
three_d.set_ylabel('Longitude')
three_d.set_zlabel('Mean Vehicle Speed')
plt.colorbar(three_d1)
plt.show()
Run Code Online (Sandbox Code Playgroud)
我的结果
我希望用 z 轴高度调整我的彩条高度。
我有一个像下面这样的 int dtype 的 df 。我想在 pandas df 列中的每个值的左侧两位数字后添加小数点
Descrip a b
VP3 52366599 10718233
VP3 522842650 106751
.
.
VP4 5232937 10542931
VP5 522842650 10615982
.
.
Run Code Online (Sandbox Code Playgroud)
我希望我的 Df 是这样的
Descrip a b
VP3 52.366599 10.718233
VP3 52.2842650 10.6751
.
.
VP4 52.32937 10.542931
VP5 52.2842650 10.615982
.
.
Run Code Online (Sandbox Code Playgroud)
由于数据框中的值没有相同的位数,所以我无法通过将每个数字除以 10e(某物)来处理简单的方法
我希望 pandas 有一个简单的方法来解决这个问题