I’m working on a small project for which I installed dask[dataframe] and dask[distributed]. However, in VSCode, even with the Python and Pylance extensions installed, I’m unable to get autocomplete to work properly.
I expected it to populate with dd.read_csv, but the only thing that comes up is raise_not_implemented_error.
However, if I entered the code myself, it ran without issues. So, the packages are installed correctly as far as I know.
What else am I missing? I also tried setting python.analysis.packageIndexDepths for dask to 99 but it didn’t help.
I copied how read_csv was import from .io in my own local modules (i.e. 2 folders deep with a init.py) and it was able to detect read_csv. So, I’m curious why it didn’t work for dask.dataframe.
In VSCode, run the command “Pylance: Clear All Persisted Indices”. I have no idea why I have to do this but I am guessing there is some cache somewhere.
That said, the autocompletion methods for
dask.dataframe.io.csv.read_csv
and
dask.dataframe.read_csv
are different. For example, the former has the blocksize argument but not the latter, though you can pass it to the latter, and it works.
So clearly, as you say in your second post, this is not a Dask problem, but it is on VSCode side.
I’m a bit surprise by that. According to the documentation, and a test I just made in a Jupyterlab, dask.dataframe.read_csv has the blocksize kwarg. And this is the one to use on user side.