Python 3.x 数据帧的三维绘图
**我试图在3D中绘制一个数据帧。我做错了什么**Python 3.x 数据帧的三维绘图,python-3.x,Python 3.x,**我试图在3D中绘制一个数据帧。我做错了什么** x = drop_1row_df.columns.tolist() print(x) y = drop_1row_df.index.strftime("%d %b, %Y").tolist() print(y) import matplotlib as mpl import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import nu
x = drop_1row_df.columns.tolist()
print(x)
y = drop_1row_df.index.strftime("%d %b, %Y").tolist()
print(y)
import matplotlib as mpl
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
X,Y = np.meshgrid(x,y)
Z = drop_1row_df
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.plot_surface(X, Y, Z)