0

I am using VS Code with Microsoft Python extension. If I create a Pandas dataframe and write the name of the variable VS Code popups all kinds of help text. However, if I have a variable made using wr.athena.read_sql_query, I don't get any help text even if the variable is a Pandas dataframe.

Is there a way to make VS Code realize that df2 in the example is a Pandas DataFrame and get the help text?

import boto3
import awswrangler as wr
import pandas as pd

df1 = pd.DataFrame({"a":[1]})
df2 = wr.athena.read_sql_query(sql="...", database="...")
John Rotenstein
  • 241,921
  • 22
  • 380
  • 470

1 Answers1

0

Adding a typing hint like so:

df2: pd.DataFrame = wr.athena.read_sql_query(sql="...", database="...")

should do it.

Abdel Jaidi
  • 306
  • 1
  • 6