# Autocomplete DataFrame columns not working in VS Code

**URL:** <https://discourse.julialang.org/t/autocomplete-dataframe-columns-not-working-in-vs-code/45449>\
**Category:** VS Code\
**Created:** [August 24, 2020, 12:03pm UTC](https://discourse.julialang.org/t/autocomplete-dataframe-columns-not-working-in-vs-code/45449 "2020-08-24T12:03:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rvezy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rvezy/32/17435_2.png) [@rvezy](https://discourse.julialang.org/u/rvezy)\
**Post date:** [August 24, 2020, 12:03pm UTC](https://discourse.julialang.org/t/autocomplete-dataframe-columns-not-working-in-vs-code/45449/1 "2020-08-24T12:03:14Z")

</div>

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:

```julia
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 ?

---

<div class="post-metadata">

**Author:** ![aviatesk](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aviatesk/32/7610_2.png) [@aviatesk](https://discourse.julialang.org/u/aviatesk)\
**Post date:** [August 24, 2020, 12:18pm UTC](https://discourse.julialang.org/t/autocomplete-dataframe-columns-not-working-in-vs-code/45449/2 "2020-08-24T12:18:14Z")

</div>

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](https://github.com/julia-vscode/julia-vscode/pull/1507)) but we’re not settled down with how to use those dynamic information yet.

---

<div class="post-metadata">

**Author:** ![rvezy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rvezy/32/17435_2.png) [@rvezy](https://discourse.julialang.org/u/rvezy)\
**Post date:** [August 24, 2020, 12:32pm UTC](https://discourse.julialang.org/t/autocomplete-dataframe-columns-not-working-in-vs-code/45449/3 "2020-08-24T12:32:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![SamBrand](https://avatars.discourse-cdn.com/v4/letter/s/c37758/32.png) [@SamBrand](https://discourse.julialang.org/u/SamBrand)\
**Post date:** [September 3, 2020, 7:58am UTC](https://discourse.julialang.org/t/autocomplete-dataframe-columns-not-working-in-vs-code/45449/4 "2020-09-03T07:58:19Z")

</div>

Thanks for doing this.

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

---

<div class="post-metadata">

**Author:** ![dpabon](https://avatars.discourse-cdn.com/v4/letter/d/da6949/32.png) [@dpabon](https://discourse.julialang.org/u/dpabon)\
**Post date:** [June 24, 2022, 11:31am UTC](https://discourse.julialang.org/t/autocomplete-dataframe-columns-not-working-in-vs-code/45449/5 "2022-06-24T11:31:45Z")

</div>

Hi everyone,

This is my first time posting here, then I hope I made it well.

I have problems with the autocompletion on VScode for different things.

1. Object structure:

```julia
x = (a = 3, b = 5)
x.

```

on vscode produced:  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/1/e/1e74e579b0bb5b900f9f63ec317a81e79e408fc0.png)

No autocompletion.

on Juno:  
It shows suggestions, but I cannot post more than one screenshot.

The same happen with names of columns when you read a CSV, and paths.

VSCode Version: Version: 1.68.1  
Commit: 30d9c6cd9483b2cc586687151bcbcd635f373630  
Date: 2022-06-15T02:58:26.441Z  
Electron: 17.4.7  
Chromium: 98.0.4758.141  
Node.js: 16.13.0  
V8: 9.8.177.13-electron.0  
OS: Linux x64 5.13.0-51-generic

Julia language support for VSCode: v1.6.24

Julia env: v1.7

Juno version: 0.12.6  
Atom version: 1.60.0

Thanks in advance for your help.

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [June 24, 2022, 11:32am UTC](https://discourse.julialang.org/t/autocomplete-dataframe-columns-not-working-in-vs-code/45449/6 "2022-06-24T11:32:57Z")

</div>

Try with `julia.runtimeCompletions` enabled.

---

<div class="post-metadata">

**Author:** ![dpabon](https://avatars.discourse-cdn.com/v4/letter/d/da6949/32.png) [@dpabon](https://discourse.julialang.org/u/dpabon)\
**Post date:** [June 24, 2022, 11:40am UTC](https://discourse.julialang.org/t/autocomplete-dataframe-columns-not-working-in-vs-code/45449/7 "2022-06-24T11:40:51Z")

</div>

Thanks, it works!

But for paths it doesn’t

on vscode:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/e/2/e2ce3afa922bd001d8393b6f80608d0e889c6945.png)
