I have the following data trying to plot a 3d wireframe. All the values in percentage, X Axis: CPU,Y Axis: Memory,Z Axis: Frame
Frame,10,20,30,40,50,60,70,80,90
10,40,46.66,46.67,33.33,53.33,60,40,20,46.67
20,53.33,40,53.3,46.67,53.33,53.33,46.67,40,53.33
30,46.67,46.67,46.67,33.33,66.67,33.3,60,40,40
40,46.67,46.67,40,53.33,40,46.67,33.33,33.33,60
df= pd.read_csv('data-graph.csv', sep=';')
df.index = df.Frame
del df['Frame']
raw_data = df
cpu = raw_data.columns.values.astype(float)
frame = raw_data.index.values.astype(float)
data = raw_data.values
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
Z = data
X, Y = np.meshgrid(cpu, frame)
ax.plot_wireframe(X, Y, Z)
ax.set_xticks(cpu)
ax.set_yticks(frame[::2])
ax.set_xlabel('CPU')
ax.set_ylabel('Memory')
I am retrieving below error.
Traceback (most recent call last):
File "C:/Users/graph-update.py", line 7, in <module>
df.index = df.Frame
File "C:\Users\learn\miniconda3\envs\tensorflow\lib\site-packages\pandas\core\generic.py", line 5274, in __getattr__
return object.__getattribute__(self, name)
AttributeError: 'DataFrame' object has no attribute 'Frame'