Category "jupyter-notebook"

Python: Formatting a Pandas dataframe head with LaTex

I have made a Pandas dataframe from several NumPy arrays and tried to format columns heads using LaTex, but it looks awful. I'm working with Jupyter Notebook. i

Cannot import name 'available_if' from 'sklearn.utils.metaestimators'

While importing "from imblearn.over_sampling import SMOTE", getting import error. Please check and help. I tried upgrading sklearn, but the upgrade was undone w

module 'numpy' has no attribute 'ndarray'

My Jupiter notebook was crushed, so I have to reinstall the notebook, but in the new Jupiter notebook, I cannot run pandas. import pandas as pd AttributeError

How to add SageMath 9.4 kernel in Jupyter notebook

I have installed SageMath 9.4, but I could not lunch it in my terminal. When I type sage it said zsh: command not found: sage then I tried alias sage='/Applic

when exporting Jupyter notebook to html file - can not see interactive plots with widgets

I have a script that creates an interactive PCA plot with a widget so the PCA. Meaning a script that I can change the x-axis and the y-axis with a dropdown menu

How to get colored legend with seaborn barplot

There is a problem with plt.legend in seaborn and matplotlib. What is wrong with it? I can't see the legend color. plt.figure(figsize=(30,10)) plt.xticks(rotati

Import geoviews in Anaconda

I am trying to install the geoviews module. I installed it successfully but when I am trying to import it in my code I have this message: No module named 'chann

Plotly Table does not show in Jupyter Lab in Python?

I try to plot table in Plotly in Python in Jupyter Lab. But my table in plotly does not show in Jupyter Lab, my code is as below: df = pd.read_csv('df.csv') fi

Seaborn kdeplot works in local - gives error in amazon sagemaker

I am running the following straightforward code: sns.kdeplot(data=subset_data['VaribleA'],fill=True, color = "#FF0000" , linewidth=1, bw_method = 0.25) When I

How to use a function and its derivative('s) to solve another differential equation in python?

I need to solve this two equations simultaneously in python : "b" is constant; but I don't know how to put the function "P" and its derivative at same time in

Python Jupyter Notebook: Embed an interactive plot in the _repr_html_() method of a class

I am trying to embed an interactive graph in the _repr_html_() method of a class C. What I have tried so far does not seem to be working in my Jupyter Notebook.

Running jupyter notebook cells as an interactive SLURM job on VScode

I am doing some analyses using vscode on a remote server that has got SLURM installed to manage jobs and provide parallel computing. I would like to run each ce

Is there a WebSocket command to execute the code blocks in a SageMaker notebook instance once there is a successful connection?

I have written a Lambda Function to start a SageMaker notebook instance, create a WebSocket connection, then execute the ipynb file inside the notebook instance

ipynb files opening in JSONformat in VSCODE

I am trying to open ipynb files in VSCODE in Ubuntu. But the files are not opening as notebook editor. Instead it is showing as raw json format. can you please

How to reduce the space between the lines in Jupyter Visual Studio Code Output?

I want to reduce the space between the lines when I print something in Jupyter visual studio code output. Current output I would like an output like Jupyter wh

Getting a 400 Response Spotify API Python

I am trying to use requests.get with the Spotify API and I can't figure out why I keep getting a 400 response. I am working in an .ipynb file in Jupyter Lab run

Importing DICOM image path (using MacBook, google collab) but getting [Errno 2] No such file or directory

I'm having trouble reading the file path that contains a DICOM image. I'm familiar with retrieving a file path on Windows and reading it but I'm currently using

jupyter notebook resource management in vscode

I have some .ipynb file and open these files in vscode but my vscode taking a lot of resources so i should reopen my vscode again and again.

Python subprocess line 1420 FileNotFoundError: [WinError 2] The system cannot find the file specified. Jupyter-Matlab notebook

I want to use Jupyter-matlab notebooks. I've downloaded Anaconda navigator and followed the steps from this web: http://jmlilly.net/jupyter-matlab Unfortunately

Type error for a column that exists within the dataframe I am trying to call

Essentially, I am getting a key error in my jupyter notebook when trying to merge two data frames. As I understand it, a key error will only occur if said colum