pcdshub / engineering_tools

A repository of scripts, configuration useful for the PCDS team
Other
4 stars 26 forks source link

grep_more_ioc fix pandas silent downcasting spam #225

Closed aberges-SLAC closed 3 days ago

aberges-SLAC commented 3 days ago

Description

Small fix to close #224 spamming terminal with the future warnings. Kind of a weird problem for these calls in pandas, take a look at https://github.com/pandas-dev/pandas/issues/57734 if you're interested.

Motivation and Context

Wanted to fix the warning spam and stay ahead of changes

How Has This Been Tested?

Have ran grep_more_ioc locally on my branch and confirmed the spam goes away and the script works as intended: image image

Where Has This Been Documented?

This PR

aberges-SLAC commented 3 days ago

Huh that's annoying. This seems right to me, though I wish we could just use the proper syntax and not have to revise this if / when we move to pandas 3.0

Yeah it's extremely annoying that the only way to make it go away is to opt into the future behavior, even if you avoided down casting in the first place.