I am trying to visualize a dataframe with bokeh in Python. This is what my dataframe looks like:
I use the following code to generate a line chart:
visualized_result.plot_bokeh(kind='line', x='x', y=['y', 'y38'], xlabel='x-values', ylabel='functions', title='Best Function')
Now I am getting the following Error:
Exception Traceback (most recent call last)
<ipython-input-50-6fd221ec89a7> in <module>
----> 1 visualized_result.plot_bokeh(kind='line', x='x', y=['y', 'y38'], xlabel='x-values', ylabel='functions', title='Best Function')
~/opt/anaconda3/lib/python3.8/site-packages/pandas_bokeh/plot.py in __call__(self, *args, **kwargs)
1785
1786 def __call__(self, *args, **kwargs):
-> 1787 return plot(self.df, *args, **kwargs)
1788
1789 @property
~/opt/anaconda3/lib/python3.8/site-packages/pandas_bokeh/plot.py in plot(df_in, x, y, kind, figsize, use_index, title, legend, logx, logy, xlabel, ylabel, xticks, yticks, xlim, ylim, fontsize_title, fontsize_label, fontsize_ticks, fontsize_legend, color, colormap, category, histogram_type, stacked, weights, bins, normed, cumulative, show_average, plot_data_points, plot_data_points_size, number_format, disable_scientific_axes, show_figure, return_html, panning, zooming, sizing_mode, toolbar_location, hovertool, hovertool_string, rangetool, vertical_xlabel, x_axis_location, webgl, reuse_plot, **kwargs)
342 )
343 else:
--> 344 raise Exception(
345 "Please provide for the <x> parameter either a column name of the DataFrame/Series or an array of the same length."
346 )
Exception: Please provide for the <x> parameter either a column name of the DataFrame/Series or an array of the same length.
Can anybody help me what is going on here? I have a feeling that this should actually be quite simple. Thanks so much for your help