The reason why mypy and the "apply" function of "Series" reject the use of "set[Any]" as a return object is because "set[Any]" is not a valid return type. "set[Any]" is an ambiguous type that could contain any possible value, which creates uncertainty about what the function actually returns.
Instead, you should use a more specific type or define a custom type that represents the set of values you expect to be returned. This will help mypy and other tools to check and enforce type correctness in your code.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2021-08-06 11:00:00 +0000
Seen: 16 times
Last updated: Jul 21 '21
What is the process of using the Multmerge() function in r to combine files in a directory?
Is it possible for two distinct useState functions to trigger changes simultaneously?
How can one use node to change an ogg file into an mp3 file?
How can a function pointer be transferred between different files in CUDA?
What does the error message "TypeError: e.endsWith is not a function" mean in Redoc?
What is the expected outcome of the math.floor function in terms of the return value?