You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exception in comms call get_namespace_view:
File "C:\Users\bandewav8638\Anaconda3\lib\site-packages\spyder_kernels\comms\commbase.py", line 343, in _handle_remote_call
return_value =self._remote_callback(
File "C:\Users\bandewav8638\Anaconda3\lib\site-packages\spyder_kernels\comms\frontendcomm.py", line 267, in _remote_callbackreturnsuper(FrontendComm, self)._remote_callback(
File "C:\Users\bandewav8638\Anaconda3\lib\site-packages\spyder_kernels\comms\commbase.py", line 356, in _remote_callbackreturnself._remote_call_handlers[call_name](
File "C:\Users\bandewav8638\Anaconda3\lib\site-packages\spyder_kernels\console\kernel.py", line 189, in get_namespace_view
view = make_remote_view(ns, settings, EXCLUDED_NAMES)
File "C:\Users\bandewav8638\Anaconda3\lib\site-packages\spyder_kernels\utils\nsview.py", line 677, in make_remote_view'type': get_human_readable_type(value),
File "C:\Users\bandewav8638\Anaconda3\lib\site-packages\spyder_kernels\utils\nsview.py", line 528, in get_human_readable_typeelifisinstance(item, PIL.Image.Image):
File "C:\Users\bandewav8638\Anaconda3\lib\site-packages\spyder_kernels\utils\lazymodules.py", line 55, in __getattr__returngetattr(self.__spy_mod__, name)
AttributeError: module 'PIL' has no attribute 'Image'
Hey @Vinesh46-git, thanks for reporting. This problem should be fixed in our latest version available in Anaconda (5.5.1). Please update by closing Spyder, opening the Anaconda Prompt and running there the commands mentioned in our documentation.
Description
What steps will reproduce the problem?
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
Load the tips dataset
tips_df = sns.load_dataset("tips")
Create a radial plot
fig = plt.figure(figsize=(8, 6))
ax = fig.add_subplot(111, polar=True)
Convert categorical variables to numerical values
day_mapping = {'Thur': 0, 'Fri': 1, 'Sat': 2, 'Sun': 3}
tips_df['day_numeric'] = tips_df['day'].map(day_mapping)
Compute mean total bill amount for each day
mean_total_bill = tips_df.groupby('day_numeric')['total_bill'].mean().values
Compute the number of days
num_days = len(mean_total_bill)
Create theta values for each day
theta = np.linspace(0, 2*np.pi, num_days, endpoint=False)
Plot the radial plot
ax.plot(theta, mean_total_bill)
ax.fill(theta, mean_total_bill, 'b', alpha=0.1)
Set the labels
ax.set_xticks(theta)
ax.set_xticklabels(day_mapping.keys())
Set the title
plt.title('Mean Total Bill Amount by Day')
Show the plot
plt.show()
Traceback
Versions
Dependencies
The text was updated successfully, but these errors were encountered: