When f.e. df.quantify, a RuntimeWarning is raised if it contains unsupported data types:
"
F:\A\repos\pint-pandas\pint_pandas\pint_array.py:225: RuntimeWarning: pint-pandas does not support magnitudes of int32. Converting magnitudes to float.
warnings.warn(
"
The RuntimeWarning is truncated...
Possible solution:
Change:
227 warnings.warn(
228 f"pint-pandas does not support magnitudes of {values.dtype}. Converting magnitudes to float.",
229 category=RuntimeWarning,
230 )
To:
227 message = f"pint-pandas does not support magnitudes of {values.dtype}. Converting magnitudes to float."
228 warnings.warn(message, category=RuntimeWarning)
When f.e. df.quantify, a RuntimeWarning is raised if it contains unsupported data types: " F:\A\repos\pint-pandas\pint_pandas\pint_array.py:225: RuntimeWarning: pint-pandas does not support magnitudes of int32. Converting magnitudes to float. warnings.warn( " The RuntimeWarning is truncated...
Possible solution:
Change: 227 warnings.warn( 228 f"pint-pandas does not support magnitudes of {values.dtype}. Converting magnitudes to float.", 229 category=RuntimeWarning, 230 )
To: 227 message = f"pint-pandas does not support magnitudes of {values.dtype}. Converting magnitudes to float." 228 warnings.warn(message, category=RuntimeWarning)
Then the message is fully shown.