I require a methodology to automatically infer type annotation for each pandas operation from the pandera DataFrameModel
import pandera as pa
import pandas as pd
from pandera.typing import DataFrame
class Schema(pa.DataFrameModel):
"""This schema defines the structure of NFO DataFrame
"""
instrument_token: (Int)
exchange_token: (Int)
tradingSymbol: (String)
name: (String)
last_price: (Float)
expiry: (datetime.date)
strike: (Float)
tick_size: (Float)
lot_size: (Int)
instrument_type: (String)
segment: (String)
exchange: (String)
df = pd.read_csv("file.csv")
pdData = DataFrame[Schema](df)
res = pdData['strike'].unique()
If we checked the type hinting of res we have ,
But we require to type annotate res to List of Float.
