You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current implementation of pandas.core.to_replace() method won't allow type hints, as noted in #32542 . Contributor guidelines suggest a refactor in this case.
changed the title [-]Refactor pandas.core.to_replace() to appease static type analysis[/-][+]Refactor pandas.core.Series.to_replace() to appease static type analysis[/+]on Jun 26, 2020
changed the title [-]Refactor pandas.core.Series.to_replace() to appease static type analysis[/-][+]Refactor pandas.core.generic.NDFrame.to_replace() to appease static type analysis[/+]on Jun 26, 2020
Activity
WillAyd commentedon Jun 22, 2020
Can you share the errors you were seeing?
[-]Refactor pandas.core.to_replace() to appease static type analysis[/-][+]Refactor pandas.core.Series.to_replace() to appease static type analysis[/+][-]Refactor pandas.core.Series.to_replace() to appease static type analysis[/-][+]Refactor pandas.core.generic.NDFrame.to_replace() to appease static type analysis[/+]oguzhanogreden commentedon Jun 26, 2020
For instance, here mypy would complain that I specified
to_replace
can be a list, which doesn't have aitems()
method.Here's the relevant mypy output (line numbers don't agree with upstream):