Skip to content Skip to sidebar Skip to footer

Copy Data From Jupyter Notebook

I would like to copy and paste data from a Jupyter notebook. As per the following example which includes the In and Out elements. When trying to copy this data I am currently una

Solution 1:

Less ugly hack:

You can do this in console of Inspection Tool:

$('div.prompt').removeClass('prompt')

And you don't have to refresh the page. You can carry on your coding with the prompt class removed from all the div elements. And you can select what you want at all times. But if you create new cells, you will have to run that again.


Ugly hack:

Steps:

  1. Right click on In [number] in your browser and click on Inspect Element

You will see something like this:

`<divclass="prompt input_prompt">In&nbsp;[18]:</div>`
  1. Double click on class and remove the prompt class from the div element. After removing it, it will look like this:

    <div class="input_prompt">In&nbsp;[18]:</div>

  2. Press Enter and close the inspection tool.

  3. Now click and select from left of I in In [] and drag your mouse inside the code block.

  4. Voila! You got what you wanted.

  5. You can replace prompt back or just refresh the page.

Post a Comment for "Copy Data From Jupyter Notebook"