Feature Type
-
[ ] Adding new functionality to pandas
-
[X] Changing existing functionality in pandas
-
[ ] Removing existing functionality in pandas
Problem Description
The how
keyword for DataFrame.merge
is typed as a string - which means that type checkers can miss potential errors, as it only accepts a subset of strings ("inner", "outer", "left", "right", "cross").
Feature Description
pandas._typing
: add a MergeHow
type, specifying the string literals that how
accepts
pandas.core.frame
: how
as accepting an argument of type MergeHow
Alternative Solutions
Alternatively we could specify the string literals in the merge
method function header
Additional Context
Comment From: alexcolemandata
take
Comment From: phofl
Hi, thanks for your report. You'll have to add this here and in the stubs repo. Otherwise it won't get picked up by type checkers