docs icon indicating copy to clipboard operation
docs copied to clipboard

astro.table.Temp Table has no object 'loc'

Open Aman0807 opened this issue 1 year ago • 1 comments

I'm trying to get hands-on with astro python sdk and was following this official tutorial

https://www.astronomer.io/docs/learn/astro-python-sdk

One of the transformation tasks is defined as

@aql.dataframe
def transform_dataframe(df: DataFrame):
    purchase_dates = df.loc[:, "purchase_date"]
    print("purchase dates:", purchase_dates)
    return DataFrame(purchase_dates)

I'm getting the following error in the transform_dataframe logs.

AttributeError: 'TempTable' object has no attribute 'loc'

Is there any intermediate step I need to follow to convert the temporary snowflake table to pandas dataframe ?

Aman0807 avatar Jun 18 '24 09:06 Aman0807