Pandas is a very difficult api to use correctly and a huge swath of programs that the AIs have trained on was "programmed by accident" meaning people just typed stuff at it until they got the output they wanted.
To offset all the bad code, you would have to make a Pandas fine tune and/or ablate the bad Pandas from the weights.