Ref: #63231 (comment)
When a option is deprecated and a user uses a pd.option_context to modify the setting, the warning stacklevel using find_stack_level() points at contextlib rather than the user's calling code. I believe find_stack_level() is not necessary here and the correct stacklevel can be set to a constant to avoid this.
Ref: #63231 (comment)
When a option is deprecated and a user uses a
pd.option_contextto modify the setting, the warning stacklevel usingfind_stack_level()points at contextlib rather than the user's calling code. I believefind_stack_level()is not necessary here and the correct stacklevel can be set to a constant to avoid this.