Sign Up

Sign In

Forget Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

You must login to ask question.

Discy Latest Questions

  • 0

I am getting TypeError: unhashable type: ‘slice’ when executing the below code for encoding categorical data in Python. Can anyone please help? # Importing the libraries import numpy as np import matplotlib.pyplot as plt import pandas as pd# Importing the dataset dataset = pd.read_csv('50_Startups.csv') y=dataset.iloc[:, 4] X=dataset.iloc[:, 0:4]# Encoding ...

  • 0

I tried to use IPython.display with the following code: from IPython.display import display, Image display(Image(filename='MyImage.png')) I also tried to use matplotlib with the following code: import matplotlib.pyplot as plt import matplotlib.image as mpimg plt.imshow(mpimg.imread('MyImage.png')) In both cases, nothing is displayed, not even an error message.

  • 0

I am running a simple python script in the server: import matplotlib.pyplot as plt import numpy as npx = np.random.randn(60) y = np.random.randn(60)plt.scatter(x, y, s=20)out_png = 'path/to/store/out_file.png' plt.savefig(out_png, dpi=150) I try to use the command python example.py in this server which has matplotlib 1.5.1 installed it fails ...

close