Autocomplete DataFrame columns not working in VS Code

Hi there, first I want to thank all people involved in the Julia extension for VS Code, you made a wonderful job.

Now I have a little issue that is annoying when doing data science: the column names of a DataFrame are not autocompleted. In Juno and in the REPL, if I have a DataFrame such as:

using DataFrames
df = DataFrame(A = 1:10, B = rand(10), C = rand(10))

I would expect to get a proposition of the column names for auto-completion if I type df.. But I don’t get any in the VS Code extension.
I don’t know if it is a bug happening just for me or if it is simply not implemented yet. I didn’t find any information on the subject so far (I tried the DataFrames doc, the VS Code extension doc and issues).

I tried to uninstall / re-install the extension but it didn’t work any better.

Can someone help me figuring that out ?

2 Likes

We’re generating completions all using static information from LS while REPL or Juno use dynamic information from running session.
What you want is actua kinda hard for LS to implement, because dataframe’s column is basically only available at runtime.

I made a PR that integrates VSCode’s completion with REPL (https://github.com/julia-vscode/julia-vscode/pull/1507) but we’re not settled down with how to use those dynamic information yet.

1 Like

OK thank you for the information, at least it’s not a bug :slight_smile: !
I’m glad there is some work ongoing to implement this, it’s very useful when doing data exploration.

1 Like

Thanks for doing this.

I have to second rvezy on this, df. auto-completion is pretty necessary when you have dozens of columns.

1 Like