Sublime Forum

Autocompletion for existing objects in python

#1

Hi

Let’s say I have code like this:

import pandas as pd

df = pd.read_csv(filename)

I would expect that if I now type

df.rena

Sublime would autocomplete to the method rename for that dataframe

Is this not the case?

I mean, autocompletion via Anaconda works well when I try it on direct imports (e.g. pd.read... will show the many possibilities), but is it meant to be working with generated objects as that dataframe?

Cheers!
Javier

0 Likes

#2

image

I don’t know how anaconda works but it may need https://pypi.org/project/pandas-stubs/

Hmm… it seems like (latest?) pandas itself is type annotated already… so just install pandas will work basically. Stubs provide better experience.

0 Likes

#3

Re-started the laptop and works again :man_shrugging:t2:

Thanks anyway

0 Likes