vscode: Unable to copy output of dataframe.columns from notebook or IW.

Running the native interactive window using the latest Python and Jupyter extensions, I’m unable to copy text from the output of df.columns.

Minimal example:

  1. Open command palette and run “Jupyte Create Interactive Window”.
  2. Enter
    import pandas as pd
    
    df = pd.DataFrame(range(2), columns=['foobar'])
    df.columns
    
  3. Try to copy-paste the column name 'foobar' into the input field at the bottom of the window. Doesn’t work (for me).

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

Trying to copy the result of a print statement, there’s a small warning that pops up briefly:

startindex 45 out of boundary

Screen Shot 2021-10-28 at 15 30 57