pandas-dev / pandas-stubs

Public type stubs for pandas
BSD 3-Clause "New" or "Revised" License
230 stars 123 forks source link

limit_area argument is currently missing for the frame.pyi #987

Open AY1uZwIcJzKhaGywovQP opened 1 month ago

AY1uZwIcJzKhaGywovQP commented 1 month ago

The new limit_area argument is missing for the ffill overloads for frame.pyi.

This was seen in VSCode (pylance)

df = pd.DataFrame({'a': [1, 2, 3], 'b': [4, 5, 6]})
df2 = df.sort_values('a')  # This infers the type correctly
df3 = df.ffill(limit=10)  # This infers the type correctly
df4 = df.ffill(limit_area='inside')  # This cannot infer the type since the `.pyi` is missing `limit_area`

When running error checking for types with standard, the error message is: No overloads for "ffill" match the provided arguments   Argument types: (Literal['inside'])

Dr-Irv commented 1 month ago

Thanks for the report. We need people to work on including changes from versions 2.0, 2.1 and 2.2. This is one of them.

PR with tests welcome.