Convert multiple rectangle shapes to paths/lines for chart
I have a very, very large bar chart that was sent to me as a PDF to design. One thing I need to do is convert the rectangular bars (in pink) into lines with an end cap. Is this possible to do to multiple rectangles at once? I have literally hundreds of bars to do this to, so manually deleting anchor points on each one is NOT an option.
The first example, which has all bars as rectangular shapes, needs to be converted into something like the second example, which has the pink bars as lines with endcap "arrowheads":

