Hello everyone!
I currently encounter the following error when I try to run the draw_cat_plot function in the gitpod workspace:
Traceback (most recent call last):
File “/workspace/boilerplate-medical-data-visualizer/medical_data_visualizer.py”, line 79, in
draw_cat_plot()
File “/workspace/boilerplate-medical-data-visualizer/medical_data_visualizer.py”, line 41, in draw_cat_plot
fig = sns.catplot(data=df_cat, x=“variable”, y=“total”, hue=“value”, kind=“bar”, col=‘cardio’)
File “/workspace/.pyenv_mirror/user/current/lib/python3.8/site-packages/seaborn/categorical.py”, line 2782, in catplot
p = Plotter(
File “/workspace/.pyenv_mirror/user/current/lib/python3.8/site-packages/seaborn/categorical.py”, line 67, in init
super().init(data=data, variables=variables)
File “/workspace/.pyenv_mirror/user/current/lib/python3.8/site-packages/seaborn/_base.py”, line 634, in init
self.assign_variables(data, variables)
File “/workspace/.pyenv_mirror/user/current/lib/python3.8/site-packages/seaborn/_base.py”, line 679, in assign_variables
plot_data = PlotData(data, variables)
File “/workspace/.pyenv_mirror/user/current/lib/python3.8/site-packages/seaborn/_core/data.py”, line 58, in init
frame, names, ids = self._assign_variables(data, variables)
File “/workspace/.pyenv_mirror/user/current/lib/python3.8/site-packages/seaborn/_core/data.py”, line 232, in _assign_variables
raise ValueError(err)
ValueError: Could not interpret value total
for y
. An entry with this name does not appear in data
.
The strange thing about this is, that I don’t get this error when I run the code with my local python interpreter. Additionally the plot I get, when I run the code locally seems to be correct.
Here is the code of my draw_cat_plot function:
I would really appreciate help on this issue.