I am not understanding why I am receiving this error as my .py file indicates that database is in fact an attribute. I have made sure that everything is indented as it should be and made sure that the correct .py is notated when importing AnimalShelter. I am following a walkthrough for this for class and the .ipynb definitely details
Tag: jupyter
How to fix Jupyter extension activation failed when opening python files?
I installed python lately on my macos system and when I try to open a python file I see this error popup about Jupyter extension : Answer Just ran into this today (I’m on MacOS for my work computer). In my case, upgrading to the pre-release version of the Jupyter extension (v2022.5.1001281006) solved it right away. If you’re not an
Jupyter notebook cell code not executing in VSCode when there is a file named random.py in the folder
I have just started using Jupyter notebooks in VSCode and have come across a strange issue. I made a folder for keeping my lab programs and there is a file named random.py in the folder. When I try to execute a code cell of my Jupyter notebook which is present in the same folder then I get an error ‘Kernel
I’m trying to import CSV file using pandas, But I’m getting Error. (look at pic)
What am I doing wrong?? I’m trying to import a csv file using pandas, i either get an error stating file can’t be found or a unicodeerror message? Answer You should escape your backslashes on Windows – U is interpreted as a unicode character directive in the string. Try:
How to replace pandas plot xticks with days?
I’ve got a pandas hist plot like shown below. As you can see the xticks are currently set to 0-6 (Sunday – Saturday). I’d like to replace the tick label to the actual days so the days are showing instead of numbers. 0 – Sunday 1 – Monday 2 – Tuesday 3 – Wednesday . . I believe there’s a
How to cause Jupyter Lab to save notebook (programmatically)
I have a notebook that runs overnight, and prints out a bunch of stuff, including images and such. I want to cause this output to be saved programatically (perhaps at certain intervals). I also want to save the code that was run. In a Jupyter notebook, you could do: (from Save an IPython notebook programmatically from within itself?) Although, I
ValueError: Object arrays cannot be loaded when allow_pickle=False
I tried to get solution for this code , hoping for a positive response output: Please let me know the solution for this Answer Try
Problems with importing Tensoflow in Jupyter. DLL load failed. Specific module failed to load
I opened up a Jupyter notebook and tried importing tensorflow as tf and got the following error message And here’s the message I received I tried installing it with the following commands But I’m still getting the same error message. I’m using windows 10 if that helps. Oh I also checked in my command line to see if it was
What does np.fft.fftfreq actually do?
I have a monthly time series and I am taking the discrete fourier transform of it. However I am confused as to how numpy converts the time domain into frequency domain? I am using np.fft.fftfreq and my time array is is 708 indices long and each measurement of the data is computed every month. This is the output frequency using
Best way to convert .ipynb to .py in VSCode
I’m looking for a good way to convert .ipynb to .py files in VSCode. So far I’ve tried: the “Export As” Option built into vscode. Not ideal as it produces the following at the start of the script, as well as “Run Cell”, “Run Below”, etc. buttons/links: “To add a new cell, type ‘# %%’ To add a new markdown