Why does the fuel gauge start moving side to side when driving. on 1999 Buick Park Avenue

For no reason when driving the fuel gauge will just start moving from side to side for no reason. Why does it do this and how can it be fixed.

Asked by for the 1999 Buick Park Avenue
possible electrical or connection
1 more answer
Mine does that. Sometimes it goes past empty and gets stuck on the needle. What i did was, while car is off, take a strong magnet and move the needle counter clock wise, until it is placed where you think it should be. Then turn vehicle to "on" and see if that worked. I had a mechanic do that, plus i have down it. It is not a life long fix. Sometimes low battery will cause it and then i have to rest it.